Set blocktime for staking
This commit is contained in:
@@ -463,8 +463,6 @@ CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, int32_t gpucount,
|
|||||||
uint64_t txfees,utxovalue; uint32_t txtime; uint256 utxotxid; int32_t i,siglen,numsigs,utxovout; uint8_t utxosig[128],*ptr;
|
uint64_t txfees,utxovalue; uint32_t txtime; uint256 utxotxid; int32_t i,siglen,numsigs,utxovout; uint8_t utxosig[128],*ptr;
|
||||||
CMutableTransaction txStaked = CreateNewContextualCMutableTransaction(Params().GetConsensus(), stakeHeight);
|
CMutableTransaction txStaked = CreateNewContextualCMutableTransaction(Params().GetConsensus(), stakeHeight);
|
||||||
|
|
||||||
//if ( blocktime > pindexPrev->GetMedianTimePast()+60 )
|
|
||||||
// blocktime = pindexPrev->GetMedianTimePast() + 60;
|
|
||||||
if (ASSETCHAINS_LWMAPOS != 0)
|
if (ASSETCHAINS_LWMAPOS != 0)
|
||||||
{
|
{
|
||||||
uint32_t nBitsPOS;
|
uint32_t nBitsPOS;
|
||||||
@@ -479,6 +477,9 @@ CBlockTemplate* CreateNewBlock(const CScript& _scriptPubKeyIn, int32_t gpucount,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
blocktime = GetAdjustedTime();
|
||||||
|
//if ( blocktime > pindexPrev->GetMedianTimePast()+60 )
|
||||||
|
// blocktime = pindexPrev->GetMedianTimePast() + 60;
|
||||||
siglen = komodo_staked(txStaked, pblock->nBits, &blocktime, &txtime, &utxotxid, &utxovout, &utxovalue, utxosig);
|
siglen = komodo_staked(txStaked, pblock->nBits, &blocktime, &txtime, &utxotxid, &utxovout, &utxovalue, utxosig);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user