Guest User

Untitled

a guest
Jul 22nd, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.00 KB | None | 0 0
  1. how to To create a genesis block
  2.  
  3. Main.h
  4.  
  5. Delete Both Main Merkle & Genesis Merkle (example)
  6. Main genesis block
  7.  
  8. static const uint256 hashGenesisBlock("0x000004611c87517dfd29fe7f34bd6da2e1ad3d305ac12afe80a3229069390f68");
  9. To
  10.  
  11. static const uint256 hashGenesisBlock("");
  12. and inside Main.h too
  13. Testnet Genesis
  14.  
  15. static const uint256 hashGenesisBlockTestNet("0x000004611c87517dfd29fe7f34bd6da2e1ad3d305ac12afe80a3229069390f68");
  16. To
  17.  
  18. static const uint256 hashGenesisBlockTestNet("");
  19. inside Main.cpp Change this to your Timestamp wanted
  20. (Example)
  21.  
  22. const char* pszTimestamp = "Blockchain.info Block #312427 2014-07-25 14:15:16";
  23. inside: Main.cpp
  24. Change these both to your Epoch Time wanted //Unixtime check google
  25.  
  26. txNew.nTime = 1406297716; (example) (example)
  27. block.nTime = 1406297716; (example) (example) (example)
  28. inside: Main.cpp Change these to 0
  29.  
  30. block.nNonce = !fTestNet ? 190271 : 190271; (example) (example) (example)
  31. inside: Main.cpp Change this to say true
  32.  
  33. if (false && (block.GetHash() != hashGenesisBlock))
  34. into
  35.  
  36. if (true && (block.GetHash() != hashGenesisBlock))
  37. inside: Main.cpp Delete the Merkle root
  38.  
  39. assert(block.hashMerkleRoot == uint256("0xc9c8f6250a60dc79038b9ae68ff747488ac80d4a2db0b194cf49628495448d21"));
  40. To
  41.  
  42. assert(block.hashMerkleRoot == uint256(""));
  43. Now Compile the Wallet, and let it crash. as next you find on the debug file the Merkle Root/Hash replace it into the blank space from you step before. but make sure that you have to add to the beginning 0x just compare and undo the steps with the new infos.
  44.  
  45. Save the Main.cpp with the New hashMerkleRoot added by you. and recompile. then start again and let the wallet crash one more time like before. visit again the debug log and replace other infos.
  46.  
  47. you find in the debug block.nNonce you remind that you remove that before. and the Genesis/Block Hash .. you remind you delete this as first. copy and paste into the free space inside the Main.h and add 0x on the beginning too.
  48.  
  49. That's it. Save all files and compile one more time. and you are a Coin Developer :-)
Add Comment
Please, Sign In to add comment