Skip to content

Commit

Permalink
Update Currency.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
HashHound committed Jul 11, 2024
1 parent 7da3b57 commit f6bba02
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/CryptoNoteCore/Currency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ bool Currency::generateGenesisBlock() {
return false;
}

BinaryArray minerTxBlob = toBinaryArray(genesisTransaction);
m_genesisBlock.baseTransaction = genesisTransaction;

m_genesisBlock.majorVersion = BLOCK_MAJOR_VERSION_1;
Expand Down Expand Up @@ -149,6 +148,13 @@ bool Currency::getBlockReward(size_t medianSize, size_t currentBlockSize, uint64
assert(alreadyGeneratedCoins <= m_moneySupply);
assert(m_emissionSpeedFactor > 0 && m_emissionSpeedFactor <= 8 * sizeof(uint64_t));

// Check if it's the genesis block
if (alreadyGeneratedCoins == 0) {
reward = parameters::GENESIS_BLOCK_REWARD;
emissionChange = reward;
return true;
}

uint64_t baseReward = (m_moneySupply - alreadyGeneratedCoins) >> m_emissionSpeedFactor;

medianSize = std::max(medianSize, m_blockGrantedFullRewardZone);
Expand Down

0 comments on commit f6bba02

Please sign in to comment.