Merge pull request #560 from jl777/jl777

Jl777
This commit is contained in:
jl777
2018-04-11 04:25:40 +03:00
committed by GitHub
2 changed files with 4 additions and 0 deletions

View File

@@ -693,7 +693,10 @@ uint32_t komodo_stake(arith_uint256 bnTarget,int32_t nHeight,uint256 txid,int32_
coinage = (((value * diff) / supply) * diff);
hashval = arith_uint256(supply * 64) * (UintToArith256(hash) / arith_uint256(coinage+1));
if ( hashval <= bnTarget )
{
winner = 1;
blocktime += segid;
}
else
{
for (iter=1; iter<3600*8; iter++)

View File

@@ -392,6 +392,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
{
uint64_t txfees,utxovalue; uint32_t txtime; uint256 utxotxid,revtxid; int32_t i,siglen,numsigs,utxovout; uint8_t utxosig[128],*ptr;
CMutableTransaction txStaked = CreateNewContextualCMutableTransaction(Params().GetConsensus(), chainActive.Height() + 1);
blocktime += 2;
if ( (siglen= komodo_staked(txStaked,pblock->nBits,&blocktime,&txtime,&utxotxid,&utxovout,&utxovalue,utxosig)) > 0 )
{
CAmount txfees = 0;