Skip to content

Commit

Permalink
backports: Do not split rewards if vDevFundAddress is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
lateminer committed Nov 5, 2023
1 parent 0a7cef4 commit 1e4dc21
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/chainparams.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ void UpdateRegtestBIP9Parameters(Consensus::DeploymentPos d, int64_t nStartTime,
// Blackcoin: Donations to dev fund
std::string CChainParams::GetDevFundAddress() const
{
return vDevFundAddress[0];
return !vDevFundAddress.empty() ? vDevFundAddress[0] : "";
}

CScript CChainParams::GetDevRewardScript() const
Expand Down
2 changes: 1 addition & 1 deletion src/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ bool CWallet::CreateCoinStake(const CKeyStore& keystore, unsigned int nBits, int
}

// Blackcoin: Donate to dev fund (or not)
if (nDonationPercentage > 0) {
if (nDonationPercentage > 0 && !Params().GetDevFundAddress().empty()) {

CAmount nDevCredit = 0;
CAmount nMinerCredit = 0;
Expand Down

0 comments on commit 1e4dc21

Please sign in to comment.