From b71efb4bed31f4cfdd6dbaeb72fe10c80089665d Mon Sep 17 00:00:00 2001 From: fsb4000 Date: Tue, 18 Nov 2014 18:23:13 +0600 Subject: [PATCH] all cases TransactionChanged --- src/wallet.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/wallet.cpp b/src/wallet.cpp index 3aed377..23dc013 100644 --- a/src/wallet.cpp +++ b/src/wallet.cpp @@ -393,6 +393,7 @@ void CWallet::WalletUpdateSpent(const CTransaction &tx, bool fBlock) wtx.MarkSpent(txin.prevout.n); wtx.WriteToDisk(); NotifyTransactionChanged(this, txin.prevout.hash, CT_UPDATED); + vMintingWalletUpdated.push_back(txin.prevout.hash); } } } @@ -410,6 +411,7 @@ void CWallet::WalletUpdateSpent(const CTransaction &tx, bool fBlock) wtx.MarkUnspent(&txout - &tx.vout[0]); wtx.WriteToDisk(); NotifyTransactionChanged(this, hash, CT_UPDATED); + vMintingWalletUpdated.push_back(hash); } } } @@ -540,7 +542,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn) // Notify UI of new or updated transaction NotifyTransactionChanged(this, hash, fInsertedNew ? CT_NEW : CT_UPDATED); - + vMintingWalletUpdated.push_back(hash); // notify an external script when a wallet transaction comes in or is updated std::string strCmd = GetArg("-walletnotify", ""); @@ -2116,6 +2118,7 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey) coin.MarkSpent(txin.prevout.n); coin.WriteToDisk(); NotifyTransactionChanged(this, coin.GetHash(), CT_UPDATED); + vMintingWalletUpdated.push_back(coin.GetHash()); } if (fFileBacked) @@ -2721,8 +2724,10 @@ void CWallet::UpdatedTransaction(const uint256 &hashTx) // Only notify UI if this transaction is in this wallet map::const_iterator mi = mapWallet.find(hashTx); if (mi != mapWallet.end()) + { NotifyTransactionChanged(this, hashTx, CT_UPDATED); - vMintingWalletUpdated.push_back(hashTx); + vMintingWalletUpdated.push_back(hashTx); + } } } -- 1.7.1