diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/handlers.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/handlers.rs b/src/handlers.rs index 6edc96f..38bd459 100644 --- a/src/handlers.rs +++ b/src/handlers.rs | |||
@@ -137,8 +137,8 @@ pub async fn propose_block(new_block: Block, db: Db) -> Result<impl warp::Reply, | |||
137 | let hashvalue = Blake2s::digest(&naked_block_flat); | 137 | let hashvalue = Blake2s::digest(&naked_block_flat); |
138 | let hash_string = format!("{:x}", hashvalue); | 138 | let hash_string = format!("{:x}", hashvalue); |
139 | 139 | ||
140 | // 5 rightmost bits are zero | 140 | // 6 rightmost bits are zero |
141 | let should_zero = hashvalue[31] as i32 + hashvalue[30] as i32 + (hashvalue[29] << 4) as i32; | 141 | let should_zero = hashvalue[31] as i32 + hashvalue[30] as i32 + hashvalue[29] as i32; |
142 | 142 | ||
143 | if should_zero == 0 { | 143 | if should_zero == 0 { |
144 | // one last check to see if block is telling the truth | 144 | // one last check to see if block is telling the truth |