Skip to content

Commit a9ec3aa

Browse files
committed
chore: address PR feedback
1 parent 6c9010c commit a9ec3aa

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

.github/workflows/bitcoin-tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ jobs:
7070
- tests::neon_integrations::use_latest_tip_integration_test
7171
- tests::neon_integrations::min_txs
7272
- tests::should_succeed_handling_malformed_and_valid_txs
73+
- tests::neon_integrations::bitcoin_reorg_flap
7374
steps:
7475
## Setup test environment
7576
- name: Setup Test Environment

stackslib/src/burnchains/bitcoin/indexer.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -837,10 +837,9 @@ impl BitcoinIndexer {
837837
}
838838
} else {
839839
// ignore the reorg
840-
test_debug!(
840+
debug!(
841841
"Reorg chain does not overtake original Bitcoin chain ({} >= {})",
842-
orig_total_work,
843-
reorg_total_work
842+
orig_total_work, reorg_total_work
844843
);
845844
new_tip = orig_spv_client.get_headers_height()?;
846845
}

stackslib/src/burnchains/db.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ impl<'a> BurnchainDBTransaction<'a> {
312312
fn store_burnchain_db_entry(
313313
&self,
314314
header: &BurnchainBlockHeader,
315-
) -> Result<i64, BurnchainError> {
315+
) -> Result<(), BurnchainError> {
316316
let sql = "INSERT OR IGNORE INTO burnchain_db_block_headers
317317
(block_height, block_hash, parent_block_hash, num_txs, timestamp)
318318
VALUES (?, ?, ?, ?, ?)";
@@ -330,11 +330,8 @@ impl<'a> BurnchainDBTransaction<'a> {
330330
"Duplicate entry for block_hash: {}, insert operation ignored.",
331331
header.block_hash
332332
);
333-
Ok(-1)
334-
} else {
335-
// A new row was inserted successfully
336-
Ok(self.sql_tx.last_insert_rowid())
337333
}
334+
Ok(())
338335
}
339336

340337
/// Add an affirmation map into the database. Returns the affirmation map ID.

0 commit comments

Comments
 (0)