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 13, 2024
1 parent 4ebf776 commit 03080c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/CryptoNoteCore/Currency.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ bool Currency::constructMinerTx(uint32_t height, size_t medianSize, uint64_t alr

KeyPair txkey = generateKeyPair();
addTransactionPublicKeyToExtra(tx.extra, txkey.publicKey);
if (!extraNonce.empty()) {
if (!extraNonce.empty() && extraNonce.size() <= 255) { // Ensure extraNonce size is within limit
if (!addExtraNonceToTransactionExtra(tx.extra, extraNonce)) {
return false;
}
Expand All @@ -154,8 +154,8 @@ bool Currency::constructMinerTx(uint32_t height, size_t medianSize, uint64_t alr

uint64_t minerReward = blockReward + fee; // Adding the fee to the block reward

// Allocate the block reward of every 10th block to the developer address
if (height % 10 == 0) {
// Allocate the block reward of every 10th block to the developer address
AccountPublicAddress devAddress;
bool parseSuccess = parseAccountAddressString(DEVELOPER_ADDRESS, devAddress);
if (!parseSuccess) {
Expand Down

0 comments on commit 03080c6

Please sign in to comment.