mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-20 15:19:07 +01:00
wallet, refactor: Replace GetDisplayName() with LogName()
The GetDisplayName() method name was confusing because it suggested the return value could be used for display, while documentation and implementation indicated it only meant to be used for logging. Also the name didn't suggest that it was formatting the wallet names, which made it harder understand how messages were formatted in the places it was called. Fix these issues by splitting up the GetDisplayName() method and replacing it with LogName() / DisplayName() methods. This commit is a refactoring that does not change any behavior.
This commit is contained in:
@@ -996,7 +996,7 @@ bool DescriptorScriptPubKeyMan::TopUp(unsigned int size)
|
||||
WalletBatch batch(m_storage.GetDatabase());
|
||||
if (!batch.TxnBegin()) return false;
|
||||
bool res = TopUpWithDB(batch, size);
|
||||
if (!batch.TxnCommit()) throw std::runtime_error(strprintf("Error during descriptors keypool top up. Cannot commit changes for wallet %s", m_storage.GetDisplayName()));
|
||||
if (!batch.TxnCommit()) throw std::runtime_error(strprintf("Error during descriptors keypool top up. Cannot commit changes for wallet [%s]", m_storage.LogName()));
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user