Skip to content

Commit

Permalink
cleanup: address review
Browse files Browse the repository at this point in the history
  • Loading branch information
tbraun96 committed Nov 26, 2024
1 parent e82f29d commit c20fd05
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion blueprint-test-utils/src/mpc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ macro_rules! mpc_generate_keygen_and_signing_tests {
[$($expected_signing_outputs:expr),*],
$atomic_keygen_call_id_store:expr,
) => {
$crate::generic_test_blueprint!(
$crate::tangle_blueprint_test_template!(
$blueprint_path,
$N,
|client, handles, blueprint| async move {
Expand Down
5 changes: 3 additions & 2 deletions blueprint-test-utils/src/tangle/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ pub fn run() -> Result<SubstrateNode, Error> {
}

#[macro_export]
macro_rules! generic_test_blueprint {
/// A template that makes creating domain-specific macros for tangle-based blueprints easier
macro_rules! tangle_blueprint_test_template {
(
$blueprint_path:expr,
$N:tt,
Expand Down Expand Up @@ -92,7 +93,7 @@ macro_rules! test_tangle_blueprint {
[$($inputs:expr),+],
[$($expected_output:expr),+]
) => {
generic_test_blueprint!(
tangle_blueprint_test_template!(
$blueprint_path,
$N,
|client, handles, blueprint| async move {
Expand Down
6 changes: 3 additions & 3 deletions blueprint-test-utils/src/tangle/transactions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub async fn create_blueprint(
Ok(())
}

pub async fn join_delegators(
pub async fn join_operators(
client: &TestClient,
account_id: &TanglePairSigner<sp_core::sr25519::Pair>,
) -> Result<(), Box<dyn Error>> {
Expand Down Expand Up @@ -206,7 +206,7 @@ pub async fn approve_service(
request_id: u64,
restaking_percent: u8,
) -> Result<(), Box<dyn Error>> {
gadget_sdk::info!("Approving service request ...");
info!("Approving service request ...");
let call = api::tx()
.services()
.approve(request_id, Percent(restaking_percent));
Expand All @@ -219,7 +219,7 @@ pub async fn approve_service(
}

pub async fn get_next_request_id(client: &TestClient) -> Result<u64, Box<dyn Error>> {
gadget_sdk::info!("Fetching next request ID ...");
info!("Fetching next request ID ...");
let next_request_id_addr = api::storage().services().next_service_request_id();
let next_request_id = client
.storage()
Expand Down
2 changes: 1 addition & 1 deletion blueprint-test-utils/src/test_ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub async fn new_test_ext_blueprint_manager<
},
};

if let Err(err) = transactions::join_delegators(&client, &keypair).await {
if let Err(err) = transactions::join_operators(&client, &keypair).await {
let _span = handle.span().enter();

let err_str = format!("{err}");
Expand Down

0 comments on commit c20fd05

Please sign in to comment.