Created
August 22, 2022 04:15
-
-
Save markodayan/84d60aa7c86eea22cbb702b8fb9ecba4 to your computer and use it in GitHub Desktop.
Verify block header
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function verifyBlockHeader(block: IRawBlock): boolean { | |
const expected = block.hash; | |
const calculated = calculateBlockHeader(block); | |
return expected === calculated; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment