Skip to content

Commit

Permalink
Add more retries for producing bundle in test
Browse files Browse the repository at this point in the history
Signed-off-by: linning <[email protected]>
  • Loading branch information
NingLin-P committed Feb 7, 2024
1 parent 8c3e269 commit e33c78c
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 131 deletions.
7 changes: 3 additions & 4 deletions crates/sp-domains-fraud-proof/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,7 @@ async fn benchmark_bundle_with_evm_tx(
const TX_TYPES: u32 = 4;
let mut thread_rng = rand::thread_rng();
let between = Uniform::from(0..TX_TYPES);
let (slot, bundle) = ferdie.produce_slot_and_wait_for_bundle_submission().await;
assert!(bundle.is_some());
let (slot, _) = ferdie.produce_slot_and_wait_for_bundle_submission().await;
produce_block_with!(ferdie.produce_block_with_slot(slot), alice)
.await
.unwrap();
Expand Down Expand Up @@ -754,15 +753,15 @@ async fn test_evm_domain_block_fee() {

// Produce a bundle that contains the just sent extrinsic
let (slot, bundle) = ferdie.produce_slot_and_wait_for_bundle_submission().await;
assert_eq!(bundle.unwrap().extrinsics.len(), 3);
assert_eq!(bundle.extrinsics.len(), 3);
produce_block_with!(ferdie.produce_block_with_slot(slot), alice)
.await
.unwrap();
let consensus_block_hash = ferdie.client.info().best_hash;

// Produce one more bundle, this bundle should contains the ER of the previous bundle
let (_, bundle) = ferdie.produce_slot_and_wait_for_bundle_submission().await;
let receipt = bundle.unwrap().into_receipt();
let receipt = bundle.into_receipt();
assert_eq!(receipt.consensus_block_hash, consensus_block_hash);

// All the transaction fee is collected as operator reward
Expand Down
Loading

0 comments on commit e33c78c

Please sign in to comment.