Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test flake: global_acceptance_depends_on_block_announcement #5733

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 14 additions & 12 deletions testnet/stacks-node/src/tests/signer/v0.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9832,14 +9832,19 @@ fn global_acceptance_depends_on_block_announcement() {
.stacks_client
.get_peer_info()
.expect("Failed to get peer info");
Ok(info.stacks_tip_height > info_before.stacks_tip_height)
Ok(info.stacks_tip_height > info_before.stacks_tip_height
&& info_before.stacks_tip_consensus_hash != info.stacks_tip_consensus_hash)
hstove marked this conversation as resolved.
Show resolved Hide resolved
},
)
.unwrap();
.expect("Stacks miner failed to produce new blocks during the newest burn block's tenure");
let info_after = signer_test
.stacks_client
.get_peer_info()
.expect("Failed to get peer info");
let info_after_stacks_block_id = StacksBlockId::new(
&info_after.stacks_tip_consensus_hash,
&info_after.stacks_tip,
);
let mut sister_block = None;
let start_time = Instant::now();
while sister_block.is_none() && start_time.elapsed() < Duration::from_secs(45) {
Expand All @@ -9849,17 +9854,14 @@ fn global_acceptance_depends_on_block_announcement() {
.find_map(|chunk| {
let message = SignerMessage::consensus_deserialize(&mut chunk.data.as_slice())
.expect("Failed to deserialize SignerMessage");
match message {
SignerMessage::BlockProposal(proposal) => {
if proposal.block.header.consensus_hash
== info_after.stacks_tip_consensus_hash
{
Some(proposal.block)
} else {
None
}
if let SignerMessage::BlockProposal(proposal) = message {
if proposal.block.block_id() == info_after_stacks_block_id {
Some(proposal.block)
} else {
None
}
_ => None,
} else {
None
}
});
}
Expand Down
Loading