[NOD-411] Fix underflowing check for resending transactions. (#457)

This commit is contained in:
stasatdaglabs 2019-11-07 16:08:40 +02:00 committed by Svarog
parent 24305cda68
commit 8dbd4a2bed

View File

@ -419,7 +419,7 @@ func applyConfirmedTransactionsAndResendNonAccepted(client *txgenClient, walletT
if isTxMatured(msgTx, *txResult.Confirmations) {
walletTx.confirmed = true
addTxOutsToUTXOSet(walletUTXOSet, msgTx)
} else if !msgTx.IsCoinBase() && *txResult.Confirmations == 0 && !txResult.IsInMempool && blockChainHeight-maxResendDepth > walletTx.chainHeight {
} else if !msgTx.IsCoinBase() && *txResult.Confirmations == 0 && !txResult.IsInMempool && blockChainHeight > walletTx.chainHeight+maxResendDepth {
log.Infof("Transaction %s was not accepted in the DAG. Resending", txID)
txChan <- msgTx
}