Skip to content

Commit

Permalink
Silence expected anchor errors in tests (#3237)
Browse files Browse the repository at this point in the history
  • Loading branch information
teor2345 authored Dec 15, 2021
1 parent f176bb5 commit ea01e30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
9 changes: 7 additions & 2 deletions zebra-state/src/service/check/anchors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,17 @@ pub(crate) fn anchors_refer_to_earlier_treestates(
&& !finalized_state.contains_sprout_anchor(&joinsplit.anchor)
&& (!interstitial_roots.contains(&joinsplit.anchor))
{
// TODO: some block after ~1_200_000 is reaching here.
// TODO: This check fails near:
// - mainnet block 1_047_908
// with anchor 019c435cd1e8aca9a4165f7e126ac6e548952439d50213f4d15c546df9d49b61
// - testnet block 1_057_737
// with anchor 3ad623811ffa4fe8498b23f3d6bb4e086dca32269afef6c8e572fd9ee6d0c0ea
//
// Restore after finding the cause and fixing it.
// return Err(ValidateContextError::UnknownSproutAnchor {
// anchor: joinsplit.anchor,
// });
tracing::error!(?joinsplit.anchor, ?prepared.height, ?prepared.hash, "failed to find sprout anchor")
tracing::warn!(?joinsplit.anchor, ?prepared.height, ?prepared.hash, "failed to find sprout anchor")
}

tracing::debug!(?joinsplit.anchor, "validated sprout anchor");
Expand Down
1 change: 1 addition & 0 deletions zebra-test/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ pub fn init() {
.unwrap()
.add_directive("zebra_consensus=error".parse().unwrap())
.add_directive("zebra_network=error".parse().unwrap())
.add_directive("zebra_state=error".parse().unwrap())
.add_directive("zebrad=error".parse().unwrap())
});

Expand Down

0 comments on commit ea01e30

Please sign in to comment.