Browse Source

Merge pull request #3701

09ec3af AddToWallet implies BindWallet (Wladimir J. van der Laan)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
913e90db9a
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 1
      src/wallet.cpp
  2. 4
      src/walletdb.cpp

1
src/wallet.cpp

@ -471,6 +471,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet) @@ -471,6 +471,7 @@ bool CWallet::AddToWallet(const CWalletTx& wtxIn, bool fFromLoadWallet)
if (fFromLoadWallet)
{
mapWallet[hash] = wtxIn;
mapWallet[hash].BindWallet(this);
AddToSpends(hash);
}
else

4
src/walletdb.cpp

@ -352,9 +352,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue, @@ -352,9 +352,7 @@ ReadKeyValue(CWallet* pwallet, CDataStream& ssKey, CDataStream& ssValue,
CWalletTx wtx;
ssValue >> wtx;
CValidationState state;
if (CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid())
wtx.BindWallet(pwallet);
else
if (!(CheckTransaction(wtx, state) && (wtx.GetHash() == hash) && state.IsValid()))
return false;
// Undo serialize changes in 31600

Loading…
Cancel
Save