Skip to content

Commit 6c36933

Browse files
committed
Fix test_pox_no_anchor_selected
Signed-off-by: Jacinta Ferrant <[email protected]>
1 parent b72a6ab commit 6c36933

File tree

1 file changed

+6
-5
lines changed
  • stackslib/src/chainstate/coordinator

1 file changed

+6
-5
lines changed

stackslib/src/chainstate/coordinator/tests.rs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6234,7 +6234,7 @@ fn test_pox_no_anchor_selected() {
62346234
let burnchain_tip = burnchain.get_canonical_chain_tip().unwrap();
62356235
let burnchain_blinded = get_burnchain_db(path_blinded, None);
62366236

6237-
eprintln!("Making block {}", ix);
6237+
eprintln!("Making block {ix}");
62386238
let (op, block) = if ix == 0 {
62396239
make_genesis_block(
62406240
&b,
@@ -6300,8 +6300,7 @@ fn test_pox_no_anchor_selected() {
63006300
let ic = sort_db.index_handle_at_tip();
63016301
let bhh = ic.get_last_anchor_block_hash().unwrap().unwrap();
63026302
eprintln!(
6303-
"Anchor block={}, selected at height={}",
6304-
&bhh,
6303+
"Anchor block={bhh}, selected at height={}",
63056304
SortitionDB::get_block_snapshot_for_winning_stacks_block(
63066305
&sort_db.index_conn(),
63076306
&ic.context.chain_tip,
@@ -6333,7 +6332,7 @@ fn test_pox_no_anchor_selected() {
63336332

63346333
// load the block into staging
63356334
let block_hash = block.header.block_hash();
6336-
eprintln!("Block hash={}, ix={}", &block_hash, ix);
6335+
eprintln!("Block hash={block_hash}, ix={ix}");
63376336

63386337
assert_eq!(&tip.winning_stacks_block_hash, &block_hash);
63396338
stacks_blocks.push((tip.sortition_id.clone(), block.clone()));
@@ -6356,10 +6355,12 @@ fn test_pox_no_anchor_selected() {
63566355
assert_eq!(&pox_id.to_string(), "1111");
63576356
}
63586357

6358+
// Because there is a missing anchor block, the blinded coordinator will not advance on any
6359+
// fork that does not build upon one
63596360
{
63606361
let ic = sort_db_blind.index_handle_at_tip();
63616362
let pox_id = ic.get_pox_id().unwrap();
6362-
assert_eq!(&pox_id.to_string(), "1101");
6363+
assert_eq!(&pox_id.to_string(), "11");
63636364
}
63646365

63656366
for (sort_id, block) in stacks_blocks.iter() {

0 commit comments

Comments
 (0)