Founders reward: changed index computation, added new test and some refactoring.

This commit is contained in:
Simon
2016-09-22 16:38:44 -07:00
parent db0f931570
commit 3b30d8361a
5 changed files with 66 additions and 35 deletions

View File

@@ -3090,7 +3090,7 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn
bool found = false;
BOOST_FOREACH(const CTxOut& output, block.vtx[0].vout) {
if (output.scriptPubKey == Params().GetFoundersRewardScript(nHeight)) {
if (output.scriptPubKey == Params().GetFoundersRewardScriptAtHeight(nHeight)) {
if (output.nValue == (GetBlockSubsidy(nHeight, consensusParams) / 5)) {
found = true;
break;