Skip to content

Commit e97b244

Browse files
committed
fix: instantiate burnchain DB earlier in the test framework, since the p2p network needs it to exist
1 parent 4eb625a commit e97b244

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

testnet/stacks-node/src/node.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,15 @@ impl Node {
346346
}
347347

348348
let burnchain_config = config.get_burnchain();
349+
350+
// instantiate DBs
351+
let _burnchain_db = BurnchainDB::connect(
352+
&burnchain_config.get_burnchaindb_path(),
353+
&burnchain_config,
354+
true,
355+
)
356+
.expect("FATAL: failed to connect to burnchain DB");
357+
349358
run_loop::announce_boot_receipts(
350359
&mut event_dispatcher,
351360
&chain_state,
@@ -526,6 +535,7 @@ impl Node {
526535
let consensus_hash = burnchain_tip.block_snapshot.consensus_hash;
527536

528537
let burnchain = self.config.get_burnchain();
538+
529539
let sortdb = SortitionDB::open(
530540
&self.config.get_burn_db_file_path(),
531541
true,

0 commit comments

Comments
 (0)