This commit is contained in:
jl777
2018-04-09 22:19:21 +03:00
parent d354a959cd
commit c4cd166396

View File

@@ -685,7 +685,7 @@ uint32_t komodo_stake(arith_uint256 bnTarget,int32_t nHeight,uint256 txid,int32_
hash = pindex->GetBlockHash(); // hash pubkey hash = pindex->GetBlockHash(); // hash pubkey
diff = (blocktime - txtime); diff = (blocktime - txtime);
coinage = (((value * diff) / supply) * diff); coinage = (((value * diff) / supply) * diff);
hashval = arith_uint256(supply) * (UintToArith256(hash) / arith_uint256(coinage+1)); hashval = (UintToArith256(hash) / arith_uint256(coinage+1));
if ( hashval <= bnTarget ) if ( hashval <= bnTarget )
winner = 1; winner = 1;
else else
@@ -694,7 +694,7 @@ uint32_t komodo_stake(arith_uint256 bnTarget,int32_t nHeight,uint256 txid,int32_
{ {
diff = (iter + blocktime - txtime); diff = (iter + blocktime - txtime);
coinage = (((value * diff) / supply) * diff); coinage = (((value * diff) / supply) * diff);
hashval = arith_uint256(supply) * (UintToArith256(hash) / arith_uint256(coinage+1)); hashval = (UintToArith256(hash) / arith_uint256(coinage+1));
if ( hashval <= bnTarget ) if ( hashval <= bnTarget )
{ {
winner = 1; winner = 1;