Skip to content

Commit 2bf2129

Browse files
authored
Merge branch 'develop' into fix/miner-forking
2 parents 151e0e2 + ab90a9d commit 2bf2129

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

stackslib/src/burnchains/bitcoin/indexer.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1100,8 +1100,10 @@ impl BurnchainIndexer for BitcoinIndexer {
11001100
start_height: u64,
11011101
end_height: Option<u64>,
11021102
) -> Result<u64, burnchain_error> {
1103-
if end_height.is_some() && end_height <= Some(start_height) {
1104-
return Ok(end_height.unwrap());
1103+
if let Some(end_height) = end_height {
1104+
if end_height <= start_height {
1105+
return Ok(end_height);
1106+
}
11051107
}
11061108

11071109
let new_height = self

stackslib/src/burnchains/tests/db.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl BurnchainDB {
5959
let sql = "SELECT op FROM burnchain_db_block_ops WHERE block_hash = ?1";
6060
let args = params![block_hash];
6161
let mut ops: Vec<BlockstackOperationType> = query_rows(&self.conn, sql, args)?;
62-
ops.sort_by(|a, b| a.vtxindex().cmp(&b.vtxindex()));
62+
ops.sort_by_key(|op| op.vtxindex());
6363
Ok(ops)
6464
}
6565

stackslib/src/chainstate/nakamoto/tests/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3049,7 +3049,7 @@ fn filter_one_transaction_per_signer_duplicate_nonces() {
30493049
txs.clone(),
30503050
);
30513051
let filtered_txs: Vec<_> = filtered_transactions.into_values().collect();
3052-
txs.sort_by(|a, b| a.txid().cmp(&b.txid()));
3052+
txs.sort_by_key(|tx| tx.txid());
30533053
assert_eq!(filtered_txs.len(), 1);
30543054
assert!(filtered_txs.contains(&txs.first().expect("failed to get first tx")));
30553055
}

0 commit comments

Comments
 (0)