Skip to content

Commit 8888cf4

Browse files
author
MarcoFalke
committed
Remove unused wallet pointer from NotifyAddressBookChanged
1 parent faf3640 commit 8888cf4

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

src/wallet/interfaces.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,8 +475,8 @@ class WalletImpl : public Wallet
475475
std::unique_ptr<Handler> handleAddressBookChanged(AddressBookChangedFn fn) override
476476
{
477477
return MakeHandler(m_wallet->NotifyAddressBookChanged.connect(
478-
[fn](CWallet*, const CTxDestination& address, const std::string& label, bool is_mine,
479-
const std::string& purpose, ChangeType status) { fn(address, label, is_mine, purpose, status); }));
478+
[fn](const CTxDestination& address, const std::string& label, bool is_mine,
479+
const std::string& purpose, ChangeType status) { fn(address, label, is_mine, purpose, status); }));
480480
}
481481
std::unique_ptr<Handler> handleTransactionChanged(TransactionChangedFn fn) override
482482
{

src/wallet/wallet.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2033,8 +2033,8 @@ bool CWallet::SetAddressBookWithDB(WalletBatch& batch, const CTxDestination& add
20332033
m_address_book[address].purpose = strPurpose;
20342034
is_mine = IsMine(address) != ISMINE_NO;
20352035
}
2036-
NotifyAddressBookChanged(this, address, strName, is_mine,
2037-
strPurpose, (fUpdated ? CT_UPDATED : CT_NEW) );
2036+
NotifyAddressBookChanged(address, strName, is_mine,
2037+
strPurpose, (fUpdated ? CT_UPDATED : CT_NEW));
20382038
if (!strPurpose.empty() && !batch.WritePurpose(EncodeDestination(address), strPurpose))
20392039
return false;
20402040
return batch.WriteName(EncodeDestination(address), strName);
@@ -2069,7 +2069,7 @@ bool CWallet::DelAddressBook(const CTxDestination& address)
20692069
is_mine = IsMine(address) != ISMINE_NO;
20702070
}
20712071

2072-
NotifyAddressBookChanged(this, address, "", is_mine, "", CT_DELETED);
2072+
NotifyAddressBookChanged(address, "", is_mine, "", CT_DELETED);
20732073

20742074
batch.ErasePurpose(EncodeDestination(address));
20752075
return batch.EraseName(EncodeDestination(address));

src/wallet/wallet.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -724,12 +724,12 @@ class CWallet final : public WalletStorage, public interfaces::Chain::Notificati
724724

725725
/**
726726
* Address book entry changed.
727-
* @note called with lock cs_wallet held.
727+
* @note called without lock cs_wallet held.
728728
*/
729-
boost::signals2::signal<void (CWallet *wallet, const CTxDestination
730-
&address, const std::string &label, bool isMine,
731-
const std::string &purpose,
732-
ChangeType status)> NotifyAddressBookChanged;
729+
boost::signals2::signal<void(const CTxDestination& address,
730+
const std::string& label, bool isMine,
731+
const std::string& purpose, ChangeType status)>
732+
NotifyAddressBookChanged;
733733

734734
/**
735735
* Wallet transaction added, removed or updated.

0 commit comments

Comments
 (0)