File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
rust/immutable-ledger/src Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -181,14 +181,18 @@ impl Block {
181181 if let Some ( previous_block) = previous_block {
182182 // Standard block
183183 let hashed_previous_block = match self . block_header . previous_block_hash . 0 {
184- HashFunction :: Blake3 => (
185- HashFunction :: Blake3 ,
186- blake3 ( & previous_block. to_bytes ( ) ?) ?. to_vec ( ) ,
187- ) ,
188- HashFunction :: Blake2b => (
189- HashFunction :: Blake2b ,
190- blake2b_512 ( & previous_block. to_bytes ( ) ?) ?. to_vec ( ) ,
191- ) ,
184+ HashFunction :: Blake3 => {
185+ (
186+ HashFunction :: Blake3 ,
187+ blake3 ( & previous_block. to_bytes ( ) ?) ?. to_vec ( ) ,
188+ )
189+ } ,
190+ HashFunction :: Blake2b => {
191+ (
192+ HashFunction :: Blake2b ,
193+ blake2b_512 ( & previous_block. to_bytes ( ) ?) ?. to_vec ( ) ,
194+ )
195+ } ,
192196 } ;
193197
194198 // chain_id MUST be the same as for the previous block (except for genesis).
You can’t perform that action at this time.
0 commit comments