mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-25 18:53:23 -03:00
Use method name from __func__ macro
Use __func__ macro in std::runtime_exception to: 1. fix method name in CWalletTx::GetAvailableWatchOnlyCredit() 2. refactor CWalletTx::GetAvailableCredit()
This commit is contained in:
parent
6dbcc74a0e
commit
9bbf60047e
1 changed files with 2 additions and 2 deletions
|
@ -1718,7 +1718,7 @@ CAmount CWalletTx::GetAvailableCredit(bool fUseCache) const
|
||||||
const CTxOut &txout = tx->vout[i];
|
const CTxOut &txout = tx->vout[i];
|
||||||
nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE);
|
nCredit += pwallet->GetCredit(txout, ISMINE_SPENDABLE);
|
||||||
if (!MoneyRange(nCredit))
|
if (!MoneyRange(nCredit))
|
||||||
throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range");
|
throw std::runtime_error(std::string(__func__) + " : value out of range");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1761,7 +1761,7 @@ CAmount CWalletTx::GetAvailableWatchOnlyCredit(const bool& fUseCache) const
|
||||||
const CTxOut &txout = tx->vout[i];
|
const CTxOut &txout = tx->vout[i];
|
||||||
nCredit += pwallet->GetCredit(txout, ISMINE_WATCH_ONLY);
|
nCredit += pwallet->GetCredit(txout, ISMINE_WATCH_ONLY);
|
||||||
if (!MoneyRange(nCredit))
|
if (!MoneyRange(nCredit))
|
||||||
throw std::runtime_error("CWalletTx::GetAvailableCredit() : value out of range");
|
throw std::runtime_error(std::string(__func__) + ": value out of range");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue