From cfe093d6ce959d4df5151aa1dcef3c8c9a5c0804 Mon Sep 17 00:00:00 2001 From: Jude Nelson Date: Tue, 3 Jan 2023 17:09:21 -0500 Subject: [PATCH] fix: don't wait for sortitions that can't come --- .../src/burnchains/bitcoin_regtest_controller.rs | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs b/testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs index 0d735e4ab..294d7bb2b 100644 --- a/testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs +++ b/testnet/stacks-node/src/burnchains/bitcoin_regtest_controller.rs @@ -475,10 +475,7 @@ impl BitcoinRegtestController { if block_for_sortitions { self.wait_for_sortitions( coordinator_comms.clone(), - cmp::min( - x.block_height, - target_block_height_opt.unwrap_or(x.block_height), - ), + target_block_height_opt.unwrap_or(x.block_height), )?; } @@ -1548,7 +1545,7 @@ impl BitcoinRegtestController { let canonical_sortition_tip = SortitionDB::get_canonical_burn_chain_tip(self.sortdb_ref().conn()).unwrap(); - if debug_ctr % 100 == 0 { + if debug_ctr % 10 == 0 { debug!( "Waiting until canonical sortition height reaches {} (currently {})", height_to_wait, canonical_sortition_tip.block_height