Browse Source

Merge pull request #3973

a60ab0b Make GetAvailableCredit run GetHash() only once per transaction. (Gregory Maxwell)
0.10
Wladimir J. van der Laan 11 years ago
parent
commit
55027a8c85
No known key found for this signature in database
GPG Key ID: 74810B012346C9A6
  1. 3
      src/wallet.h

3
src/wallet.h

@ -620,9 +620,10 @@ public: @@ -620,9 +620,10 @@ public:
return nAvailableCreditCached;
int64_t nCredit = 0;
uint256 hashTx = GetHash();
for (unsigned int i = 0; i < vout.size(); i++)
{
if (!pwallet->IsSpent(GetHash(), i))
if (!pwallet->IsSpent(hashTx, i))
{
const CTxOut &txout = vout[i];
nCredit += pwallet->GetCredit(txout);

Loading…
Cancel
Save