aboutsummaryrefslogtreecommitdiff
path: root/src/test/validation_block_tests.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/validation_block_tests.cpp')
-rw-r--r--src/test/validation_block_tests.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/test/validation_block_tests.cpp b/src/test/validation_block_tests.cpp
index ea17cb50f..a32b25899 100644
--- a/src/test/validation_block_tests.cpp
+++ b/src/test/validation_block_tests.cpp
@@ -85,7 +85,10 @@ std::shared_ptr<CBlock> MinerTestingSetup::Block(const uint256& prev_hash)
CMutableTransaction txCoinbase(*pblock->vtx[0]);
txCoinbase.vout.resize(2);
txCoinbase.vout[1].scriptPubKey = pubKey;
- txCoinbase.vout[1].nValue = txCoinbase.vout[0].nValue;
+ // Dogecoin: Override the calculated reward with a fixed value we know is going to be safe for every block.
+ // We need this as the blocks are not added to the chain as they're built, and as such the random subsidy
+ // calculation uses an incorrect previous block hash.
+ txCoinbase.vout[1].nValue = 10000 * COIN;
txCoinbase.vout[0].nValue = 0;
txCoinbase.vin[0].scriptWitness.SetNull();
pblock->vtx[0] = MakeTransactionRef(std::move(txCoinbase));