Skip to content

Commit 9819d61

Browse files
committed
remove debug prints and checks
1 parent c352472 commit 9819d61

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

zebra-state/src/komodo_notaries.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ fn is_second_block_allowed(notary_id: NotaryId, blocktime: DateTime<Utc>, thresh
109109
if v_priority_list.len() != 64 {
110110
return Err(NotaryValidateContextError::NotaryInternalError(String::from("invalid priority list")));
111111
}
112+
112113
if blocktime >= threshold && delta > 0 {
113114
if let Ok(pos) = usize::try_from((blocktime - threshold).num_seconds() / delta as i64) {
114115
if pos < v_priority_list.len() {
@@ -150,7 +151,6 @@ fn komodo_check_if_second_block_allowed<C>(network: Network, notary_id: NotaryId
150151
tracing::info!("komodo notary hf22 second block allowed for ht={:?}", height);
151152
return Ok(());
152153
}
153-
error!("komodo invalid second block generated for notary_id={} block.header={:?}", notary_id, block.header);
154154
Err(NotaryValidateContextError::NotaryBlockInvalid(*height, block.hash(), String::from("invalid second block after gap")))
155155
}
156156

zebra-state/src/service/check.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,6 @@ where
120120
prepared.block.header.difficulty_threshold.to_expanded().ok_or(ValidateContextError::KomodoSpecialBlockInvalidDifficulty(prepared.height, prepared.hash))?
121121
};
122122

123-
assert!(!prepared.hash.0.iter().all(|&x| x == 0), "hash must not be all zeroes"); // TODO: check for debug purposes, if hash in prepared initialised correctly
124-
125123
// check proof of work matches claimed amount
126124
if prepared.hash > bn_target {
127125
/* https://github.com/KomodoPlatform/komodo/blob/156dba60184c07d0781a57d5b5005b8f3dba0c98/src/pow.cpp#L757 */

0 commit comments

Comments
 (0)