We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d76962e commit a59dac3Copy full SHA for a59dac3
src/wallet/rpcwallet.cpp
@@ -3171,10 +3171,11 @@ UniValue listunspent(const JSONRPCRequest& request)
3171
if (fValidAddress) {
3172
entry.pushKV("address", EncodeDestination(address));
3173
3174
- if (pwallet->mapAddressBook.count(address)) {
3175
- entry.pushKV("label", pwallet->mapAddressBook[address].name);
+ auto i = pwallet->mapAddressBook.find(address);
+ if (i != pwallet->mapAddressBook.end()) {
3176
+ entry.pushKV("label", i->second.name);
3177
if (IsDeprecatedRPCEnabled("accounts")) {
- entry.pushKV("account", pwallet->mapAddressBook[address].name);
3178
+ entry.pushKV("account", i->second.name);
3179
}
3180
3181
0 commit comments