Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpolaczyk committed Sep 7, 2021
1 parent 84a3833 commit 2db052b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
1 change: 1 addition & 0 deletions data_structures/src/mainnet_validations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -706,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

0 comments on commit 2db052b

Please sign in to comment.