diff --git a/stackslib/src/chainstate/stacks/tests/block_construction.rs b/stackslib/src/chainstate/stacks/tests/block_construction.rs index 3be2894669..79491afa9e 100644 --- a/stackslib/src/chainstate/stacks/tests/block_construction.rs +++ b/stackslib/src/chainstate/stacks/tests/block_construction.rs @@ -5163,12 +5163,12 @@ fn mempool_walk_test_next_nonce_with_highest_fee_rate_strategy() { // // tuple shape: (origin_address_index, origin_nonce, sponsor_address_index, sponsor_nonce, fee_rate) let test_vectors = vec![ - (0, 0, 0, 0, 100.0), // Old origin nonce - ignored - (0, 1, 0, 1, 200.0), // Old origin nonce - ignored + (0, 0, 0, 0, 100.0), // Old origin nonce - ignored + (0, 1, 0, 1, 200.0), // Old origin nonce - ignored (0, 2, 0, 2, 300.0), (0, 3, 0, 3, 400.0), - (0, 4, 3, 0, 500.0), // Nonce 0 for address 3 is not in the table but will be valid on MARF - (1, 0, 1, 0, 400.0), // Old origin nonce - ignored + (0, 4, 3, 0, 500.0), // Nonce 0 for address 3 is not in the table but will be valid on MARF + (1, 0, 1, 0, 400.0), // Old origin nonce - ignored (1, 1, 3, 1, 600.0), (1, 2, 3, 2, 700.0), (1, 3, 3, 3, 800.0), diff --git a/stackslib/src/core/mempool.rs b/stackslib/src/core/mempool.rs index 2e5fc95bfc..2f56d10969 100644 --- a/stackslib/src/core/mempool.rs +++ b/stackslib/src/core/mempool.rs @@ -1720,10 +1720,10 @@ impl MemPoolDB { let mut query_stmt_null = self .db .prepare(&sql) - .map_err(|err| Error::SqliteError(err))?; + .map_err(Error::SqliteError)?; let mut null_iterator = query_stmt_null .query(NO_PARAMS) - .map_err(|err| Error::SqliteError(err))?; + .map_err(Error::SqliteError)?; let sql = " SELECT txid, origin_nonce, origin_address, sponsor_nonce, sponsor_address, fee_rate FROM mempool @@ -1733,10 +1733,10 @@ impl MemPoolDB { let mut query_stmt_fee = self .db .prepare(&sql) - .map_err(|err| Error::SqliteError(err))?; + .map_err(Error::SqliteError)?; let mut fee_iterator = query_stmt_fee .query(NO_PARAMS) - .map_err(|err| Error::SqliteError(err))?; + .map_err(Error::SqliteError)?; // == Query for `NextNonceWithHighestFeeRate` mempool walk strategy // @@ -1789,7 +1789,7 @@ impl MemPoolDB { let mut query_stmt_nonce_rank = self .db .prepare(&sql) - .map_err(|err| Error::SqliteError(err))?; + .map_err(Error::SqliteError)?; let stop_reason = loop { if start_time.elapsed().as_millis() > settings.max_walk_time_ms as u128 { @@ -1814,9 +1814,9 @@ impl MemPoolDB { let opt_tx = if start_with_no_estimate { null_iterator .next() - .map_err(|err| Error::SqliteError(err))? + .map_err(Error::SqliteError)? } else { - fee_iterator.next().map_err(|err| Error::SqliteError(err))? + fee_iterator.next().map_err(Error::SqliteError)? }; match opt_tx { Some(row) => { @@ -1827,11 +1827,11 @@ impl MemPoolDB { match if start_with_no_estimate { fee_iterator .next() - .map_err(|err| Error::SqliteError(err))? + .map_err(Error::SqliteError)? } else { null_iterator .next() - .map_err(|err| Error::SqliteError(err))? + .map_err(Error::SqliteError)? } { Some(row) => ( MemPoolTxInfoPartial::from_row(row)?, @@ -1848,9 +1848,9 @@ impl MemPoolDB { MemPoolWalkStrategy::NextNonceWithHighestFeeRate => { match query_stmt_nonce_rank .query(NO_PARAMS) - .map_err(|err| Error::SqliteError(err))? + .map_err(Error::SqliteError)? .next() - .map_err(|err| Error::SqliteError(err))? + .map_err(Error::SqliteError)? { Some(row) => { let tx = MemPoolTxInfoPartial::from_row(row)?;