|
|
|
@ -232,7 +232,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn)
@@ -232,7 +232,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn)
|
|
|
|
|
// Inserts only if not already there, returns tx inserted or tx found
|
|
|
|
|
pair<map<uint256, CWalletTx>::iterator, bool> ret = mapWallet.insert(make_pair(hash, wtxIn)); |
|
|
|
|
CWalletTx& wtx = (*ret.first).second; |
|
|
|
|
wtx.pwallet = this; |
|
|
|
|
wtx.BindWallet(this); |
|
|
|
|
bool fInsertedNew = ret.second; |
|
|
|
|
if (fInsertedNew) |
|
|
|
|
wtx.nTimeReceived = GetAdjustedTime(); |
|
|
|
@ -924,7 +924,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
@@ -924,7 +924,7 @@ bool CWallet::CreateTransaction(const vector<pair<CScript, int64> >& vecSend, CW
|
|
|
|
|
if (vecSend.empty() || nValue < 0) |
|
|
|
|
return false; |
|
|
|
|
|
|
|
|
|
wtxNew.pwallet = this; |
|
|
|
|
wtxNew.BindWallet(this); |
|
|
|
|
|
|
|
|
|
CRITICAL_BLOCK(cs_main) |
|
|
|
|
CRITICAL_BLOCK(cs_wallet) |
|
|
|
@ -1062,7 +1062,7 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
@@ -1062,7 +1062,7 @@ bool CWallet::CommitTransaction(CWalletTx& wtxNew, CReserveKey& reservekey)
|
|
|
|
|
BOOST_FOREACH(const CTxIn& txin, wtxNew.vin) |
|
|
|
|
{ |
|
|
|
|
CWalletTx &coin = mapWallet[txin.prevout.hash]; |
|
|
|
|
coin.pwallet = this; |
|
|
|
|
coin.BindWallet(this); |
|
|
|
|
coin.MarkSpent(txin.prevout.n); |
|
|
|
|
coin.WriteToDisk(); |
|
|
|
|
vWalletUpdated.push_back(coin.GetHash()); |
|
|
|
|