// Helper function to assert the number of Archive Nodes. Also, returns
// CanisterId's for convenience.
Helper function to assert the number of Archive Nodes. Also, returns
CanisterId's for convenience.
Helper function to assert the number of Archive Nodes . Also returns CanisterId ' s for convenience .
async fn ledger_assert_num_nodes(ledger: &Canister<'_>, num_expected: usize) -> Vec<CanisterId> {
    let nodes: Vec<CanisterId> = ledger
        .update_("get_nodes", dfn_candid::candid, ())
        .await
        .unwrap();
    println!("[test] retrieved {} archive nodes", nodes.len());
    assert_eq!(nodes.len(), num_expected);
    nodes
}
async fn ledger_assert_num_nodes ( ledger : & Canister < ' _ > , num_expected : usize ) -> Vec < CanisterId > { let nodes : Vec < CanisterId > = ledger . update_ ( " " , dfn_candid :: candid , ( ) ) . await . unwrap ( ) ; println ! ( " " nodes len ( ) ) ; assert_eq ! ( nodes len ( ) num_expected ) ; nodes }
Helper function to assert the number of Archive Nodes.
Helper function to assert the number of Archive Nodes .
ledger
&Canister<'_>
num_expected
usize