Sapling support for z_shieldcoinbase and more

This commit is contained in:
miketout
2018-10-08 16:17:24 -07:00
19 changed files with 297 additions and 78 deletions

View File

@@ -38,6 +38,20 @@ unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHead
if (pindexLast == NULL )
return nProofOfWorkLimit;
//{
// Comparing to pindexLast->nHeight with >= because this function
// returns the work required for the block after pindexLast.
//if (params.nPowAllowMinDifficultyBlocksAfterHeight != boost::none &&
// pindexLast->nHeight >= params.nPowAllowMinDifficultyBlocksAfterHeight.get())
//{
// Special difficulty rule for testnet:
// If the new block's timestamp is more than 6 * 2.5 minutes
// then allow mining of a min-difficulty block.
// if (pblock && pblock->GetBlockTime() > pindexLast->GetBlockTime() + params.nPowTargetSpacing * 6)
// return nProofOfWorkLimit;
//}
//}
// Find the first block in the averaging interval
const CBlockIndex* pindexFirst = pindexLast;
arith_uint256 bnTot {0};