Skip to content

Commit

Permalink
test: tally rng request
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpolaczyk authored and lrubiorod committed Sep 7, 2021
1 parent 0cbf185 commit 9e89325
Show file tree
Hide file tree
Showing 6 changed files with 440 additions and 5 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions data_structures/src/mainnet_validations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ fn test_wip_info() -> HashMap<String, Epoch> {
active_wips.insert("WIP0009-0011-0012".to_string(), 0);
active_wips.insert("THIRD_HARD_FORK".to_string(), 0);
active_wips.insert("WIP0014-0016".to_string(), 0);
active_wips.insert("WIP0017".to_string(), 0);
active_wips.insert("WIP0019".to_string(), 0);

active_wips
}
Expand Down Expand Up @@ -704,6 +706,7 @@ mod tests {
}

#[test]
#[ignore]
fn test_initialize_mainnet_and_testnet() {
let mut t_mainnet = TapiEngine::default();
let (_epoch, _old_wips) = t_mainnet.initialize_wip_information(Environment::Mainnet);
Expand Down
15 changes: 11 additions & 4 deletions node/tests/data_request_examples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,23 @@ use std::{
use serde::{Deserialize, Serialize};

use witnet_data_structures::chain::DataRequestOutput;
use witnet_data_structures::mainnet_validations::ActiveWips;
use witnet_node::actors::messages::BuildDrt;
use witnet_rad::{
current_active_wips,
script::RadonScriptExecutionSettings,
types::{
bytes::RadonBytes, float::RadonFloat, integer::RadonInteger, string::RadonString,
RadonTypes,
},
};

fn current_active_wips() -> ActiveWips {
let mut h = witnet_rad::current_active_wips();
h.active_wips.insert("WIP0017".to_string(), 0);
h.active_wips.insert("WIP0019".to_string(), 0);
h
}

/// Id. Can be null, a number, or a string
#[derive(Debug, Serialize, Deserialize)]
#[serde(untagged)]
Expand Down Expand Up @@ -177,9 +184,9 @@ fn existing_examples() -> HashMap<&'static str, (BuildDrt, &'static [&'static st
examples::random_bytes(),
&["4"],
RadonTypes::Bytes(RadonBytes::from(vec![
0xE1, 0x1D, 0x8C, 0xB9, 0x4B, 0x54, 0xE0, 0xA2, 0xFD, 0x0E, 0x78, 0x0F, 0x93, 0xDD,
0x51, 0x83, 0x7F, 0xD3, 0x9B, 0xF0, 0xC9, 0xB8, 0x6F, 0x21, 0xE7, 0x60, 0xD0, 0x2A,
0x85, 0x50, 0xDD, 0xF7,
0xC0, 0xCD, 0x96, 0xF3, 0xBB, 0x86, 0xE2, 0x60, 0x74, 0x3C, 0x99, 0x9C, 0xB6, 0xE4,
0x93, 0x39, 0xA2, 0x15, 0x1F, 0xD3, 0xC2, 0x5E, 0xEB, 0x4C, 0x14, 0x66, 0xB3, 0x55,
0xD9, 0x30, 0x0D, 0x40,
])),
),
];
Expand Down
1 change: 1 addition & 0 deletions validations/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ witnet_rad = { path = "../rad" }
[dev-dependencies]
approx = "0.5.0"
bencher = "0.1.5"
hex = "0.4.3"
witnet_config = { path = "../config" }
witnet_protected = { path = "../protected" }

Expand Down
Loading

0 comments on commit 9e89325

Please sign in to comment.