Bitcoin Forum
November 15, 2024, 07:19:14 AM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: I am attempting to mine the genesis block of a brand new altcoin plz help  (Read 163 times)
Kissdaddy (OP)
Newbie
*
Offline Offline

Activity: 1
Merit: 0


View Profile
August 14, 2019, 08:34:47 PM
 #1

This is how far I've gotten with debug.log

2019-08-14 20:22:20 Kcoin version v0.8.7.5-g9cffb23c2d48-beta ()
2019-08-14 20:22:20 Using OpenSSL version OpenSSL 1.0.2n  7 Dec 2017
2019-08-14 20:22:20 Default data directory /home/kissdaddy23/.Kcoin
2019-08-14 20:22:20 Using data directory /home/kissdaddy23/.Kcoin
2019-08-14 20:22:20 Using at most 125 connections (1024 file descriptors available)
2019-08-14 20:22:20 Using 4 threads for script verification
2019-08-14 20:22:20 init message: Verifying wallet...
2019-08-14 20:22:20 dbenv.open LogDir=/home/kissdaddy23/.Kcoin/database ErrorFile=/home/kissdaddy23/.Kcoin/db.log
2019-08-14 20:22:20 Bound to [::]:9333
2019-08-14 20:22:20 Bound to 0.0.0.0:9333
2019-08-14 20:22:20 init message: Loading block index...
2019-08-14 20:22:20 Opening LevelDB in /home/kissdaddy23/.Kcoin/blocks/index
2019-08-14 20:22:20 Opened LevelDB successfully
2019-08-14 20:22:20 Opening LevelDB in /home/kissdaddy23/.Kcoin/chainstate
2019-08-14 20:22:20 Opened LevelDB successfully
2019-08-14 20:22:20 LoadBlockIndexDB(): last block file = 0
2019-08-14 20:22:20 LoadBlockIndexDB(): transaction index disabled
2019-08-14 20:22:20 Initializing databases...
2019-08-14 20:22:20 a26c60ab32be5f7cb16bed8ba4c993f0dfbaae640a3eea1a74304e5a0f866c60
2019-08-14 20:22:20 0000000000000000000000000000000000000000000000000000000000000000
2019-08-14 20:22:20 655293c614d79f67cb90443da6f88461ab3ace0f56a8dc9ea9ee1d9c2ce0e0ba
2019-08-14 20:22:20 searching for genesis block...

i attempted to enter the merkle root with my code  this is what my genesis code looks like in main.cpp

  if (fTestNet)
        {
            block.nTime    = 1565646420;
            block.nNonce   = 0;
        }

        //// debug print
        uint256 hash = block.GetHash();
        printf("%s\n", hash.ToString().c_str());
        printf("%s\n", hashGenesisBlock.ToString().c_str());
        printf("%s\n", block.hashMerkleRoot.ToString().c_str());
        assert(block.hashMerkleRoot == uint256("655293c614d79f67cb90443da6f88461ab3ace0f56a8dc9ea9ee1d9c2ce0e0ba"));
        if (true && block.GetHash() != hashGenesisBlock)
        {
          printf("searching for genesis block...\n");
          //this will figureout a valid hash and Nonce if you're
          //creating a different genesis block:
          uint256 hashTarget=CBigNum().SetCompact(block.nBits).getuint256();
          uint256 thash;
          char scratchpad[SCRYPT_SCRATCHPAD_SIZE];

          loop
          {
          scrypt_1024_1_1_256_sp(BEGIN(block.nVersion), BEGIN(thash), scratchpad);
          if(thash <=hashTarget)
            break;
          if((block.nNonce & 0xfff) == 0)
          {
            ++block.nTime;
          }
        }
printf("block.nTime = %u /n", block.nTime);
printf("block.nNonce = %u /n", block.nNonce);
printf("block.GetHash =%s/n", block.GetHash().ToString().c_str());

}
        block.print();
        assert(hash == hashGenesisBlock);
 Now I keep getting this error please help, thank you
main.cpp:2835: bool InitBlockIndex(): Assertion `hash == hashGenesisBlock' failed.
Aborted (core dumped)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!