Skip to content

Commit

Permalink
fix(starknet_integration_tests): fix no txs sent bug
Browse files Browse the repository at this point in the history
  • Loading branch information
alonh5 committed Dec 17, 2024
1 parent 2d78adc commit e134208
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ pub async fn end_to_end_integration(mut tx_generator: MultiAccountTransactionGen
let sender_address = tx_generator.account_with_id(ACCOUNT_ID_0).sender_address();
info!("Sending {n_txs} txs.");
let tx_hashes = send_account_txs(tx_generator, ACCOUNT_ID_0, n_txs, send_rpc_tx_fn).await;
assert_eq!(tx_hashes.len(), n_txs);

info!("Awaiting until {EXPECTED_BLOCK_NUMBER} blocks have been created.");

Expand All @@ -98,7 +99,7 @@ pub async fn end_to_end_integration(mut tx_generator: MultiAccountTransactionGen
);

info!("Verifying tx sender account nonce.");
let expected_nonce_value = tx_hashes.len() + 1;
let expected_nonce_value = n_txs + 1;
let expected_nonce =
Nonce(Felt::from_hex_unchecked(format!("0x{:X}", expected_nonce_value).as_str()));
let nonce = get_account_nonce(&batcher_storage_reader, sender_address);
Expand Down
2 changes: 1 addition & 1 deletion crates/starknet_integration_tests/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ pub async fn send_account_txs<'a, Fut>(
where
Fut: Future<Output = TransactionHash> + 'a,
{
let rpc_txs = create_account_txs(tx_generator, n_txs, account_id);
let rpc_txs = create_account_txs(tx_generator, account_id, n_txs);
send_rpc_txs(rpc_txs, send_rpc_tx_fn).await
}

Expand Down

0 comments on commit e134208

Please sign in to comment.