aboutsummaryrefslogtreecommitdiff
path: root/src/wallet.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2014-03-29 09:35:05 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2014-03-29 09:35:11 +0100
commit55027a8c85e373f8e7e750cc18e97308be31094b (patch)
treeb7b5b9f4229990a69b7edf0f1c26c17e72a65722 /src/wallet.h
parente9d2e6ed909ccb8c04a66365c70885681b215c19 (diff)
parenta60ab0ba89289433563c4c0993904acbca8c99ff (diff)
Merge pull request #3973
a60ab0b Make GetAvailableCredit run GetHash() only once per transaction. (Gregory Maxwell)
Diffstat (limited to 'src/wallet.h')
-rw-r--r--src/wallet.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wallet.h b/src/wallet.h
index e2e89fffe7..487c258a20 100644
--- a/src/wallet.h
+++ b/src/wallet.h
@@ -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);