chore: improve Nibbles-related code (#5631)

This commit is contained in:
DaniPopes
2023-11-30 20:28:50 +01:00
committed by GitHub
parent a4ed76d058
commit 0d522e8472
23 changed files with 313 additions and 233 deletions

View File

@ -35,8 +35,7 @@ fn create_transactions_for_sender(
.unwrap()
.current();
let mut nonce = 0;
for tx in txs.iter_mut() {
for (nonce, tx) in txs.iter_mut().enumerate() {
// reject pre-eip1559 tx types, if there is a legacy tx, replace it with an eip1559 tx
if tx.is_legacy() || tx.is_eip2930() {
*tx = MockTransaction::eip1559();
@ -47,8 +46,7 @@ fn create_transactions_for_sender(
}
tx.set_sender(sender);
tx.set_nonce(nonce);
nonce += 1;
tx.set_nonce(nonce as u64);
}
txs