Skip to content

Instantly share code, notes, and snippets.

Avatar
👻
One man’s constant is another man’s variable.

Grégory Saive evias

👻
One man’s constant is another man’s variable.
View GitHub Profile
View verifyBlock.js
function verifyBlock(data){
const block = JSON.parse(data);
signer = block.signer;
signature = block.signature;
v = cat.GeneratorUtils.uintToBuffer(block.version, 1) //version:8
n = cat.GeneratorUtils.uintToBuffer(block.networkType, 1) //network:8
t = cat.GeneratorUtils.uintToBuffer(block.type, 2) //type:16