From a180384de29b262f45991cc2572a0b798acf5f9f Mon Sep 17 00:00:00 2001 From: Aaron Blankstein Date: Wed, 18 Sep 2024 16:00:10 -0500 Subject: [PATCH] test: update mempool_db_load_store_replace_tx --- stackslib/src/core/tests/mod.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/stackslib/src/core/tests/mod.rs b/stackslib/src/core/tests/mod.rs index 9a7f96376e..b14967f263 100644 --- a/stackslib/src/core/tests/mod.rs +++ b/stackslib/src/core/tests/mod.rs @@ -1408,15 +1408,16 @@ fn mempool_db_load_store_replace_tx(#[case] behavior: MempoolCollectionBehavior) let mut mempool_tx = mempool.tx_begin().unwrap(); eprintln!("add all txs"); - for (i, mut tx) in txs.drain(..).enumerate() { + let txs_len = txs.len(); + for (ix, mut tx) in txs.drain(..).enumerate() { // make sure each address is unique per tx (not the case in codec_all_transactions) let origin_address = StacksAddress { version: 22, - bytes: Hash160::from_data(&i.to_be_bytes()), + bytes: Hash160::from_data(&ix.to_be_bytes()), }; let sponsor_address = StacksAddress { version: 22, - bytes: Hash160::from_data(&(i + 1).to_be_bytes()), + bytes: Hash160::from_data(&(ix + txs_len).to_be_bytes()), }; tx.set_tx_fee(123);