Cryptonote Premine and Money Supply

Cryptonote Premine and Money Supply

I have two question here. And both are related. I've been struggling about a week to solve this issue.

1) How do I set coin limit?

I already set this in the MONEY_SUPPLY field. I want it to have only 8000000 coins. My code look like this:

const uint64_t MONEY_SUPPLY = uint64_t(8000000);

Am I doing right for this variable?

2) How do I award all coins to the first miner? (premine)

For this one, i've modified Currency.cpp in function Currency::getBlockReward to add the first block reward like this :

if (alreadyGeneratedCoins == 0) {
        baseReward = m_moneySupply  * 1;
        std::cout << "Genesis block reward: " << baseReward << std::endl;
    }
    if (alreadyGeneratedCoins == 1){
        baseReward = m_moneySupply * 0.10;
    }
    if (alreadyGeneratedCoins + baseReward >= m_moneySupply) {
        baseReward = 0;
    }

Ive run two seed node in VPS and mine from my machine. It doesnt award all the coins to the address. It only give about 0.0000343 per block. How do I give all the coins to the first miner? Or am I understand the premine term incorrectly?

Thanks

http://ift.tt/2FyNNwB

Comments

Popular posts from this blog

Bitcoin Core errors with database block

Bitfinex & Market Synergy To Offer Institutional Calibre Cryptocurrency Connectivity