diff --git a/src/qt/transactionrecord.cpp b/src/qt/transactionrecord.cpp index 071154dda..06ddaf964 100644 --- a/src/qt/transactionrecord.cpp +++ b/src/qt/transactionrecord.cpp @@ -241,7 +241,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) if (status.depth < 0) { status.status = TransactionStatus::Conflicted; - status.hasConflicting = !(wtx.GetConflicts(false).empty()); + status.hasConflicting = !(wtx.GetConflicts().empty()); } else if (GetAdjustedTime() - wtx.nTimeReceived > 2 * 60 && wtx.GetRequestCount() == 0) { @@ -250,7 +250,7 @@ void TransactionRecord::updateStatus(const CWalletTx &wtx) else if (status.depth == 0) { status.status = TransactionStatus::Unconfirmed; - status.hasConflicting = !(wtx.GetConflicts(false).empty()); + status.hasConflicting = !(wtx.GetConflicts().empty()); if (wtx.isAbandoned()) status.status = TransactionStatus::Abandoned; } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 272ce0789..6ab41af1e 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -1197,9 +1197,17 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletD CWalletTx& txConflict = mapWallet[conflictHash]; NotifyTransactionChanged(this, conflictHash, CT_UPDATED); //Updates UI table if (IsFromMe(txConflict) || IsMine(txConflict)) - { - NotifyTransactionChanged(this, conflictHash, CT_GOT_CONFLICT); //Throws dialog - } + { + // external respend notify + std::string strCmd = GetArg("-respendnotify", ""); + if (!strCmd.empty()) + { + NotifyTransactionChanged(this, conflictHash, CT_GOT_CONFLICT); //Throws dialog + boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex()); + boost::replace_all(strCmd, "%t", conflictHash.GetHex()); + boost::thread t(runCommand, strCmd); // thread runs free + } + } } } @@ -1212,15 +1220,6 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet, CWalletD boost::thread t(runCommand, strCmd); // thread runs free } - // external respend notify - std::string strCmdRespend = GetArg("-respendnotify", ""); - if (!strCmdRespend.empty()) - { - boost::replace_all(strCmd, "%s", wtxIn.GetHash().GetHex()); - boost::replace_all(strCmd, "%t", hash.GetHex()); - boost::thread t(runCommand, strCmd); // thread runs free - } - } return true; }