Skip to content

Commit cdb5394

Browse files
committed
use * in mempool SELECT
1 parent f394e64 commit cdb5394

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

stackslib/src/core/mempool.rs

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2015,21 +2015,7 @@ impl MemPoolDB {
20152015
nonce: u64,
20162016
) -> Result<Option<MemPoolTxMetadata>, db_error> {
20172017
let sql = format!(
2018-
"SELECT
2019-
txid,
2020-
origin_address,
2021-
origin_nonce,
2022-
sponsor_address,
2023-
sponsor_nonce,
2024-
tx_fee,
2025-
length,
2026-
consensus_hash,
2027-
block_header_hash,
2028-
height,
2029-
accept_time,
2030-
last_known_sponsor_nonce,
2031-
last_known_origin_nonce
2032-
FROM mempool WHERE {0}_address = ?1 AND {0}_nonce = ?2",
2018+
"SELECT * FROM mempool WHERE {0}_address = ?1 AND {0}_nonce = ?2",
20332019
if is_origin { "origin" } else { "sponsor" }
20342020
);
20352021
let args = params![addr.to_string(), u64_to_sql(nonce)?];

stackslib/src/core/tests/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ fn mempool_do_not_replace_tx() {
13811381
.unwrap_err();
13821382
assert!(match err_resp {
13831383
MemPoolRejection::ConflictingNonceInMempool => true,
1384-
_ => false,
1384+
e => panic!("Failed: {e:?}"),
13851385
});
13861386

13871387
assert!(MemPoolDB::db_has_tx(&mempool_tx, &prior_txid).unwrap());

0 commit comments

Comments
 (0)