Skip to content

Commit 045fcce

Browse files
committed
chore: use test-specific chains coordinator settings to allow tests to handle (now legacy) cases where the PoX anchor block does not arrive in order (or at all)
1 parent 4f6b190 commit 045fcce

File tree

1 file changed

+9
-1
lines changed
  • stackslib/src/chainstate/coordinator

1 file changed

+9
-1
lines changed

stackslib/src/chainstate/coordinator/mod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,14 @@ impl ChainsCoordinatorConfig {
217217
assume_present_anchor_blocks: true,
218218
}
219219
}
220+
221+
pub fn test_new() -> ChainsCoordinatorConfig {
222+
ChainsCoordinatorConfig {
223+
always_use_affirmation_maps: false,
224+
require_affirmed_anchor_blocks: false,
225+
assume_present_anchor_blocks: false,
226+
}
227+
}
220228
}
221229

222230
pub struct ChainsCoordinator<
@@ -704,7 +712,7 @@ impl<'a, T: BlockEventDispatcher, U: RewardSetProvider, B: BurnchainHeaderReader
704712
notifier: (),
705713
atlas_config,
706714
atlas_db: Some(atlas_db),
707-
config: ChainsCoordinatorConfig::new(),
715+
config: ChainsCoordinatorConfig::test_new(),
708716
burnchain_indexer,
709717
refresh_stacker_db: Arc::new(AtomicBool::new(false)),
710718
in_nakamoto_epoch: false,

0 commit comments

Comments
 (0)