This commit is contained in:
jl777
2016-10-03 10:20:27 -03:00
parent c939721cee
commit 7bfc207ada
4 changed files with 18 additions and 9 deletions

View File

@@ -16,14 +16,14 @@
#include "sodium.h"
int32_t komodo_is_notaryblock(void *pblock);
int32_t komodo_is_notaryblock(uint8_t *pblock,uint8_t *coinbase,uint8_t *minerout);
unsigned int GetNextWorkRequired(const CBlockIndex* pindexLast, const CBlockHeader *pblock, const Consensus::Params& params)
{
unsigned int nProofOfWorkLimit = UintToArith256(params.powLimit).GetCompact();
// Genesis block
if (pindexLast == NULL || komodo_is_notaryblock((void *)pblock) != 0 )
if (pindexLast == NULL || komodo_is_notaryblock((uint8_t *)pblock,(uint8_t *)pblock->vin[0].scriptSig,(uint8_t *)pblock->vout[0].scriptPubKey) != 0 )
return nProofOfWorkLimit;
// Find the first block in the averaging interval