Relay double-spends, subject to anti-DOS

cef3711500 (diff-7ec3c68a81efff79b6ca22ac1f1eabbaL929)
This commit is contained in:
lateminer
2018-01-10 21:52:38 +03:00
parent 48feed03ef
commit 72875a2116
12 changed files with 150 additions and 56 deletions

View File

@@ -240,7 +240,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
if (status.depth < 0)
{
status.status = TransactionStatus::Conflicted;
status.hasConflicting = !(wtx.GetConflicts().empty());
status.hasConflicting = !(wtx.GetConflicts(false).empty());
}
else if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0)
{
@@ -249,7 +249,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx)
else if (status.depth == 0)
{
status.status = TransactionStatus::Unconfirmed;
status.hasConflicting = !(wtx.GetConflicts().empty());
status.hasConflicting = !(wtx.GetConflicts(false).empty());
if (wtx.isAbandoned())
status.status = TransactionStatus::Abandoned;
}