mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 20:12:57 +01:00
Re-enable FillBlockPayee for mnpayments, fix CreateNewBlock calculations (#811)
* Reenable FillBlockPayee for mnpayments, fix CreateNewBlock calculations * revert blockchain.py fix #772
This commit is contained in:
parent
5411d78b11
commit
6698d2ce89
@ -49,11 +49,11 @@ class BlockchainTest(BitcoinTestFramework):
|
||||
node = self.nodes[0]
|
||||
res = node.gettxoutsetinfo()
|
||||
|
||||
assert_equal(res[u'total_amount'], Decimal('98178.57142879'))
|
||||
assert_equal(res[u'total_amount'], Decimal('98214.28571450'))
|
||||
assert_equal(res[u'transactions'], 200)
|
||||
assert_equal(res[u'height'], 200)
|
||||
assert_equal(res[u'txouts'], 200)
|
||||
assert_equal(res[u'bytes_serialized'], 14277),
|
||||
assert_equal(res[u'bytes_serialized'], 14273),
|
||||
assert_equal(len(res[u'bestblock']), 64)
|
||||
assert_equal(len(res[u'hash_serialized']), 64)
|
||||
|
||||
|
@ -284,6 +284,7 @@ void FillBlockPayee(CMutableTransaction& txNew, CAmount nFees)
|
||||
// } else {
|
||||
// mnpayments.FillBlockPayee(txNew, nFees);
|
||||
// }
|
||||
mnpayments.FillBlockPayee(txNew, nFees);
|
||||
}
|
||||
|
||||
std::string GetRequiredPaymentsString(int nBlockHeight)
|
||||
@ -336,7 +337,7 @@ void CMasternodePayments::FillBlockPayee(CMutableTransaction& txNew, CAmount nFe
|
||||
ExtractDestination(payee, address1);
|
||||
CBitcoinAddress address2(address1);
|
||||
|
||||
LogPrintf("Masternode payment to %s\n", address2.ToString());
|
||||
LogPrintf("Masternode payment %d to %s\n", masternodePayment, address2.ToString());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -286,7 +286,8 @@ CBlockTemplate* CreateNewBlock(const CChainParams& chainparams, const CScript& s
|
||||
LogPrintf("CreateNewBlock(): total size %u txs: %u fees: %ld sigops %d\n", nBlockSize, nBlockTx, nFees, nBlockSigOps);
|
||||
|
||||
// Compute final coinbase transaction.
|
||||
txNew.vout[0].nValue = nFees + GetBlockSubsidy(pindexPrev->nBits, nHeight, chainparams.GetConsensus());
|
||||
// Should already be calculated in FillBlockPayee
|
||||
// txNew.vout[0].nValue = nFees + GetBlockSubsidy(pindexPrev->nBits, nHeight, chainparams.GetConsensus());
|
||||
txNew.vin[0].scriptSig = CScript() << nHeight << OP_0;
|
||||
pblock->vtx[0] = txNew;
|
||||
pblocktemplate->vTxFees[0] = -nFees;
|
||||
|
Loading…
Reference in New Issue
Block a user