Skip to content

Instantly share code, notes, and snippets.

@RushOnline
Created May 21, 2018 10:35
Show Gist options
  • Save RushOnline/c2da7b120345bd9637baa270c3af3868 to your computer and use it in GitHub Desktop.
Save RushOnline/c2da7b120345bd9637baa270c3af3868 to your computer and use it in GitHub Desktop.
Hex dump altcoin/bitcoin genesis block header
CDataStream ds(SER_NETWORK, PROTOCOL_VERSION);
( (CBlockHeader*) &genesis )->Serialize(ds);
for(CDataStream::const_iterator it = ds.begin(); it != ds.end(); ++it) {
fprintf(stdout, "%02x", 0x00FF & *it);
}
fprintf(stdout, "\n");
exit(1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment