Skip to content

Commit

Permalink
fix: get syntax working with bls example
Browse files Browse the repository at this point in the history
  • Loading branch information
tbraun96 committed Nov 25, 2024
1 parent 0159533 commit e82f29d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
4 changes: 2 additions & 2 deletions blueprint-test-utils/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ use url::Url;
use uuid::Uuid;
use gadget_sdk::{error, info};

pub use gadget_sdk::logging::setup_log;

pub use cargo_tangle::deploy::Opts;
pub use gadget_sdk::logging::setup_log;

pub type InputValue = runtime_types::tangle_primitives::services::field::Field<AccountId32>;
pub type OutputValue = runtime_types::tangle_primitives::services::field::Field<AccountId32>;
Expand All @@ -50,6 +49,7 @@ pub mod tangle;
pub mod test_ext;
use anvil::ANVIL_PRIVATE_KEYS;
pub use gadget_sdk;
pub use gadget_sdk::ext::blueprint_serde::BoundedVec;
pub use tangle::transactions::{get_next_call_id, submit_job, wait_for_completion_of_tangle_job};
pub use tempfile;

Expand Down
10 changes: 6 additions & 4 deletions blueprint-test-utils/src/mpc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#[macro_export]
macro_rules! mpc_generate_keygen_and_signing_tests {
(
$blueprint_path:expr,
$blueprint_path:literal,
$N:tt,
$T:tt,
$keygen_job_id:tt,
Expand All @@ -10,13 +10,14 @@ macro_rules! mpc_generate_keygen_and_signing_tests {
$signing_job_id:tt,
[$($signing_inputs:expr),+],
[$($expected_signing_outputs:expr),*],
$atomic_keygen_call_id_store:expr,
) => {
$crate::generic_test_blueprint!(
$blueprint_path,
$N,
|client, handles, blueprint| async move {
let keypair = handles[0].sr25519_id().clone();
let service = &blueprint.services[$keygen_job_id];
let service = &blueprint.services[$keygen_job_id as usize];

let service_id = service.id;
gadget_sdk::info!(
Expand All @@ -36,9 +37,10 @@ macro_rules! mpc_generate_keygen_and_signing_tests {
.expect("Failed to submit job");

let keygen_call_id = job.call_id;
$atomic_keygen_call_id_store.store(keygen_call_id, std::sync::atomic::Ordering::Relaxed);

gadget_sdk::info!(
"Submitted KEYGEN job {} with service ID {service_id} has call id {}", $keygen_job_id
"Submitted KEYGEN job {} with service ID {service_id} has call id {keygen_call_id}", $keygen_job_id,
);

let job_results = wait_for_completion_of_tangle_job(client, service_id, keygen_call_id, $T)
Expand All @@ -56,7 +58,7 @@ macro_rules! mpc_generate_keygen_and_signing_tests {
}

// ~~~~~ Now, run a signing job ~~~~~
let service = &blueprint.services[$signing_job_id];
let service = &blueprint.services[$signing_job_id as usize];

let service_id = service.id;
gadget_sdk::info!(
Expand Down

0 comments on commit e82f29d

Please sign in to comment.