Changeset View
Changeset View
Standalone View
Standalone View
src/validation.cpp
Show First 20 Lines • Show All 1,814 Lines • ▼ Show 20 Lines | if (block.vtx[0]->GetValueOut() > blockReward) { | ||||
block.vtx[0]->GetValueOut(), blockReward); | block.vtx[0]->GetValueOut(), blockReward); | ||||
return state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, | return state.Invalid(BlockValidationResult::BLOCK_CONSENSUS, | ||||
REJECT_INVALID, "bad-cb-amount"); | REJECT_INVALID, "bad-cb-amount"); | ||||
} | } | ||||
const std::vector<CTxDestination> whitelist = | const std::vector<CTxDestination> whitelist = | ||||
GetMinerFundWhitelist(consensusParams, pindex->pprev); | GetMinerFundWhitelist(consensusParams, pindex->pprev); | ||||
if (!whitelist.empty()) { | if (!whitelist.empty()) { | ||||
const Amount required = (MINER_FUND_RATIO * blockReward) / 100; | const Amount required = GetMinerFundAmount(blockReward); | ||||
for (auto &o : block.vtx[0]->vout) { | for (auto &o : block.vtx[0]->vout) { | ||||
if (o.nValue < required) { | if (o.nValue < required) { | ||||
// This output doesn't qualify because its amount is too low. | // This output doesn't qualify because its amount is too low. | ||||
continue; | continue; | ||||
} | } | ||||
CTxDestination address; | CTxDestination address; | ||||
▲ Show 20 Lines • Show All 3,936 Lines • Show Last 20 Lines |