Last active
June 20, 2020 21:58
-
-
Save epheph/35525113bb9378f3799d809eeac91e75 to your computer and use it in GitHub Desktop.
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
| // NOTE: Non-functional pseudo code | |
| function verifyBlock(parentBlock, stateRoot, blockNumber, timestamp, ...) returns (bool) { | |
| bytes32 _realBlockHash = blockhash(blockNumber); | |
| bytes32 _proposedBlockHash = keccek256(rlpEncode(parentBlock, stateRoot, blockNumber, timestamp, ...)); | |
| return _proposedBlockHash == _realBlockHash; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment