diff options
| author | Ross Nicoll <[email protected]> | 2021-05-29 09:32:55 +0100 |
|---|---|---|
| committer | Ross Nicoll <[email protected]> | 2021-05-30 22:12:51 +0100 |
| commit | 4fea2ce46877fdf754dc9e22d1e8b3830f5919bd (patch) | |
| tree | c784707358fa06965cacf0ee90752fcbf82402ef /src/test/validation_block_tests.cpp | |
| parent | Merge pull request #1977 from rnicoll/1.21-difficulty (diff) | |
| download | discoin-4fea2ce46877fdf754dc9e22d1e8b3830f5919bd.tar.xz discoin-4fea2ce46877fdf754dc9e22d1e8b3830f5919bd.zip | |
Add Dogecoin block subsidies
Diffstat (limited to 'src/test/validation_block_tests.cpp')
| -rw-r--r-- | src/test/validation_block_tests.cpp | 5 |
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)); |