Avoid any potential double staking penalty that make occur during repeated reorgs
This commit is contained in:
@@ -1346,7 +1346,8 @@ bool CWallet::VerusSelectStakeOutput(CBlock *pBlock, arith_uint256 &hashResult,
|
||||
if (txout.fSpendable && (UintToArith256(txout.tx->GetVerusPOSHash(&(pBlock->nNonce), txout.i, nHeight, pastHash)) <= target) && (txout.nDepth >= VERUS_MIN_STAKEAGE))
|
||||
{
|
||||
if ((!pwinner || UintToArith256(curNonce) > UintToArith256(pBlock->nNonce)) &&
|
||||
(Solver(txout.tx->vout[txout.i].scriptPubKey, whichType, vSolutions) && (whichType == TX_PUBKEY || whichType == TX_PUBKEYHASH)))
|
||||
(Solver(txout.tx->vout[txout.i].scriptPubKey, whichType, vSolutions) && (whichType == TX_PUBKEY || whichType == TX_PUBKEYHASH)) &&
|
||||
!cheatList.IsUTXOInList(COutPoint(txout.tx->GetHash(), txout.i), nHeight <= 100 ? 1 : nHeight-100))
|
||||
{
|
||||
//printf("Found PoS block\nnNonce: %s\n", pBlock->nNonce.GetHex().c_str());
|
||||
pwinner = &txout;
|
||||
|
||||
Reference in New Issue
Block a user