Author

Topic: cannot spend the premine coins (Read 116 times)

newbie
Activity: 12
Merit: 1
February 03, 2020, 07:19:52 AM
#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?
Jump to: