Skip to content

Commit

Permalink
fix: registry tests: use new signature for test_indexer's finalize_ba…
Browse files Browse the repository at this point in the history
…tched_address_tree_update
  • Loading branch information
sergeytimoshin committed Jan 5, 2025
1 parent 3e330ff commit 5490bf9
Showing 1 changed file with 8 additions and 32 deletions.
40 changes: 8 additions & 32 deletions program-tests/registry-test/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1892,18 +1892,9 @@ async fn test_batch_address_tree() {
)
.await
.unwrap();
let mut account = rpc
.get_account(env.batch_address_merkle_tree)
.await
.unwrap()
.unwrap();
let zero_copy_account =
BatchedMerkleTreeAccount::address_tree_from_bytes_mut(account.data.as_mut_slice())
.unwrap();
test_indexer.finalize_batched_address_tree_update(
env.batch_address_merkle_tree,
&zero_copy_account,
);
test_indexer
.finalize_batched_address_tree_update(&mut rpc, env.batch_address_merkle_tree)
.await;
}
}

Expand All @@ -1921,18 +1912,9 @@ async fn test_batch_address_tree() {
.await
.unwrap();
}
let mut account = rpc
.get_account(env.batch_address_merkle_tree)
.await
.unwrap()
.unwrap();
let zero_copy_account =
BatchedMerkleTreeAccount::address_tree_from_bytes_mut(account.data.as_mut_slice())
.unwrap();
test_indexer.finalize_batched_address_tree_update(
env.batch_address_merkle_tree,
&zero_copy_account,
);
test_indexer
.finalize_batched_address_tree_update(&mut rpc, env.batch_address_merkle_tree)
.await;
}

// Non eligible forester.
Expand Down Expand Up @@ -1970,15 +1952,9 @@ async fn test_batch_address_tree() {
.await
.unwrap();
}
let mut account = rpc
.get_account(env.batch_address_merkle_tree)
.await
.unwrap()
.unwrap();
let zero_copy_account =
BatchedMerkleTreeAccount::address_tree_from_bytes_mut(account.data.as_mut_slice()).unwrap();
test_indexer
.finalize_batched_address_tree_update(env.batch_address_merkle_tree, &zero_copy_account);
.finalize_batched_address_tree_update(&mut rpc, env.batch_address_merkle_tree)
.await;
}

pub async fn perform_batch_address_merkle_tree_update<R: RpcConnection>(
Expand Down

0 comments on commit 5490bf9

Please sign in to comment.