Unverified Commit 55027a8c authored by Wladimir J. van der Laan's avatar Wladimir J. van der Laan
Browse files

Merge pull request #3973

a60ab0ba Make GetAvailableCredit run GetHash() only once per transaction. (Gregory Maxwell)
parents e9d2e6ed a60ab0ba
Showing with 2 additions and 1 deletion
+2 -1
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment