@@ -867,6 +867,8 @@ const CHAINSTATE_SCHEMA_3: &'static [&'static str] = &[
867
867
// proessed
868
868
r#"
869
869
CREATE TABLE burnchain_txids(
870
+ -- in epoch 2.x, this is the index block hash of the Stacks block.
871
+ -- in epoch 3.x, this is the index block hash of the tenure-start block.
870
872
index_block_hash TEXT PRIMARY KEY,
871
873
-- this is a JSON-encoded list of txids
872
874
txids TEXT NOT NULL
@@ -2494,7 +2496,7 @@ impl StacksChainState {
2494
2496
}
2495
2497
2496
2498
/// Get the burnchain txids for a given index block hash
2497
- fn get_burnchain_txids_for_block (
2499
+ pub ( crate ) fn get_burnchain_txids_for_block (
2498
2500
conn : & Connection ,
2499
2501
index_block_hash : & StacksBlockId ,
2500
2502
) -> Result < Vec < Txid > , Error > {
@@ -2516,6 +2518,7 @@ impl StacksChainState {
2516
2518
}
2517
2519
2518
2520
/// Get the txids of the burnchain operations applied in the past N Stacks blocks.
2521
+ /// Only works for epoch 2.x
2519
2522
pub fn get_burnchain_txids_in_ancestors (
2520
2523
conn : & Connection ,
2521
2524
index_block_hash : & StacksBlockId ,
@@ -2532,7 +2535,10 @@ impl StacksChainState {
2532
2535
Ok ( ret)
2533
2536
}
2534
2537
2535
- /// Store all on-burnchain STX operations' txids by index block hash
2538
+ /// Store all on-burnchain STX operations' txids by index block hash.
2539
+ /// `index_block_hash` is the tenure-start block.
2540
+ /// * For epoch 2.x, this is simply the block ID
2541
+ /// * for epoch 3.x and later, this is the first block in the tenure.
2536
2542
pub fn store_burnchain_txids (
2537
2543
tx : & DBTx ,
2538
2544
index_block_hash : & StacksBlockId ,
0 commit comments