Skip to content

Commit c352472

Browse files
committed
count the invalid special block as regular block
1 parent 8793d62 commit c352472

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

zebra-state/src/service/check.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,12 @@ where
106106
difficulty_adjustment,
107107
)?;
108108

109-
let bn_target = if komodo_is_special_notary_block(&prepared.block, &prepared.height, network, relevant_chain.into_iter())? // returns error if special block invalid
109+
let f_is_special_notary_block = match komodo_is_special_notary_block(&prepared.block, &prepared.height, network, relevant_chain.into_iter()) {
110+
Ok(f_is_special) => f_is_special,
111+
Err(_) => false, // returns error if special block invalid, i.e. it should be validate as regular block
112+
};
113+
114+
let bn_target = if f_is_special_notary_block
110115
{
111116
tracing::debug!("block ht={:?} is a komodo special block", prepared.height);
112117
ExpandedDifficulty::target_difficulty_limit(network)

0 commit comments

Comments
 (0)