Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JesseAbram committed Oct 30, 2024
1 parent 2c7a071 commit e39cbcf
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
Binary file modified crates/client/entropy_metadata.scale
Binary file not shown.
2 changes: 1 addition & 1 deletion crates/threshold-signature-server/src/helpers/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ pub async fn store_program_and_register(
.await
.unwrap();

(verifying_key, program_hash)
(verifying_key, sp_core::H256(program_hash.into()))
}

/// Do a network jumpstart DKG
Expand Down
10 changes: 5 additions & 5 deletions crates/threshold-signature-server/src/user/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ use sp_keyring::{AccountKeyring, Sr25519Keyring};
use std::{str, str::FromStr, time::Duration};
use subxt::{
backend::legacy::LegacyRpcMethods,
config::PolkadotExtrinsicParamsBuilder as Params,
config::DefaultExtrinsicParamsBuilder as Params,
ext::{
sp_core::{hashing::blake2_256, sr25519, sr25519::Signature, Pair},
sp_runtime::AccountId32,
Expand Down Expand Up @@ -260,8 +260,8 @@ async fn test_signature_requests_fail_on_different_conditions() {
verifying_key.as_slice().try_into().unwrap(),
&two.pair(),
OtherBoundedVec(vec![
OtherProgramInstance { program_pointer: program_hash, program_config: vec![] },
OtherProgramInstance { program_pointer: program_hash, program_config: vec![] },
OtherProgramInstance { program_pointer: subxt::utils::H256(program_hash.into()), program_config: vec![] },
OtherProgramInstance { program_pointer: subxt::utils::H256(program_hash.into()), program_config: vec![] },
]),
)
.await
Expand Down Expand Up @@ -1200,7 +1200,7 @@ async fn test_device_key_proxy() {
};

// check to make sure config data stored properly
let program_query = entropy::storage().programs().programs(*DEVICE_KEY_HASH);
let program_query = entropy::storage().programs().programs(subxt::utils::H256(DEVICE_KEY_HASH.0));
let program_data = query_chain(&entropy_api, &rpc, program_query, None).await.unwrap().unwrap();
let schema_config_device_key_proxy = schema_for!(UserConfig);
let schema_aux_data_device_key_proxy = schema_for!(AuxData);
Expand All @@ -1222,7 +1222,7 @@ async fn test_device_key_proxy() {
verifying_key.as_slice().try_into().unwrap(),
&two.pair(),
OtherBoundedVec(vec![OtherProgramInstance {
program_pointer: *DEVICE_KEY_HASH,
program_pointer: subxt::utils::H256(DEVICE_KEY_HASH.0),
program_config: serde_json::to_vec(&device_key_user_config).unwrap(),
}]),
)
Expand Down
6 changes: 0 additions & 6 deletions node/cli/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,6 @@ pub fn new_full_base<N: NetworkBackend<Block, <Block as BlockT>::Hash>>(
import_setup.1.shared_authority_set().clone(),
Vec::default(),
));
println!("test here 1");
let (network, system_rpc_tx, tx_handler_controller, network_starter, sync_service) =
sc_service::build_network(sc_service::BuildNetworkParams {
config: &config,
Expand Down Expand Up @@ -434,11 +433,9 @@ pub fn new_full_base<N: NetworkBackend<Block, <Block as BlockT>::Hash>>(
task_manager.spawn_handle().spawn("mixnet", None, mixnet);
}

println!("test here 3");

if config.offchain_worker.enabled {
use futures::FutureExt;
println!("test here 4");

task_manager.spawn_handle().spawn(
"offchain-workers-runner",
Expand Down Expand Up @@ -489,7 +486,6 @@ pub fn new_full_base<N: NetworkBackend<Block, <Block as BlockT>::Hash>>(
);
log::info!("Threshold Signing Sever (TSS) location changed to {}", endpoint);
}
println!("test here 5");

}

Expand All @@ -500,7 +496,6 @@ pub fn new_full_base<N: NetworkBackend<Block, <Block as BlockT>::Hash>>(
let name = config.network.node_name.clone();
let enable_grandpa = !config.disable_grandpa;
let prometheus_registry = config.prometheus_registry().cloned();
println!("test here 6");

let rpc_handlers = sc_service::spawn_tasks(sc_service::SpawnTasksParams {
config,
Expand All @@ -516,7 +511,6 @@ pub fn new_full_base<N: NetworkBackend<Block, <Block as BlockT>::Hash>>(
sync_service: sync_service.clone(),
telemetry: telemetry.as_mut(),
})?;
println!("test here 7");

if let Some(hwbench) = hwbench {
sc_sysinfo::print_hwbench(&hwbench);
Expand Down

0 comments on commit e39cbcf

Please sign in to comment.