Bitcoin Forum
June 01, 2024, 12:13:39 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: cannot spend the premine coins  (Read 101 times)
vanshtah (OP)
Newbie
*
Offline Offline

Activity: 12
Merit: 1


View Profile
February 03, 2020, 12:19:52 PM
 #1

I am trying to develop a new coin, i used the litecoin source code v.015 to develop a new coin and i added the premine coin in validation.cpp

Code:
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams)
{
    int halvings = nHeight / consensusParams.nSubsidyHalvingInterval;
    // Force block reward to zero when right shift is undefined.
    if (halvings >= 64)
        return 0;
    CAmount nSubsidy = 50 * COIN;
    if(nHeight == 4) 
    {
        nSubsidy = 1000000000 * COIN;
        return nSubsidy;
    }
    // Subsidy is cut in half every 210,000 blocks which will occur approximately every 4 years.
    nSubsidy >>= halvings;
   

Everything works perfectly except I cannot spend the premine, can someone help?
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!