mirror of
https://github.com/Qortal/pirate-librustzcash.git
synced 2025-07-31 12:31:22 +00:00
Log distinct error cases in Equihash verification
This commit is contained in:
@@ -16,6 +16,7 @@ ff = { path = "../ff" }
|
||||
fpe = "0.2"
|
||||
hex = "0.3"
|
||||
lazy_static = "1"
|
||||
log = "0.4"
|
||||
pairing = { path = "../pairing" }
|
||||
rand = "0.7"
|
||||
rand_core = "0.5"
|
||||
|
@@ -1,5 +1,6 @@
|
||||
use blake2b_simd::{Hash as Blake2bHash, Params as Blake2bParams, State as Blake2bState};
|
||||
use byteorder::{BigEndian, LittleEndian, ReadBytesExt, WriteBytesExt};
|
||||
use log::error;
|
||||
use std::io::Cursor;
|
||||
use std::mem::size_of;
|
||||
|
||||
@@ -196,13 +197,13 @@ fn distinct_indices(a: &Node, b: &Node) -> bool {
|
||||
|
||||
fn validate_subtrees(p: &Params, a: &Node, b: &Node) -> bool {
|
||||
if !has_collision(a, b, p.collision_byte_length()) {
|
||||
// error!("Invalid solution: invalid collision length between StepRows");
|
||||
error!("Invalid solution: invalid collision length between StepRows");
|
||||
false
|
||||
} else if b.indices_before(a) {
|
||||
// error!("Invalid solution: Index tree incorrectly ordered");
|
||||
error!("Invalid solution: Index tree incorrectly ordered");
|
||||
false
|
||||
} else if !distinct_indices(a, b) {
|
||||
// error!("Invalid solution: duplicate indices");
|
||||
error!("Invalid solution: duplicate indices");
|
||||
false
|
||||
} else {
|
||||
true
|
||||
|
Reference in New Issue
Block a user