mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-05-28 06:43:49 +02:00
signals: Use a lambda to avoid connecting a signal to another signal
This is undocumented and unspecified Boost behavior that happens to work as intended for now, but could break at any point in the future. See the boost discussion here: https://groups.google.com/g/boost-list/c/So4i8JXneJ0 It also complicates a potential replacement of Boost::signals2.
This commit is contained in:
@@ -3549,7 +3549,9 @@ bool CWallet::HaveCryptedKeys() const
|
||||
void CWallet::ConnectScriptPubKeyManNotifiers()
|
||||
{
|
||||
for (const auto& spk_man : GetActiveScriptPubKeyMans()) {
|
||||
spk_man->NotifyCanGetAddressesChanged.connect(NotifyCanGetAddressesChanged);
|
||||
spk_man->NotifyCanGetAddressesChanged.connect([this] {
|
||||
NotifyCanGetAddressesChanged();
|
||||
});
|
||||
spk_man->NotifyFirstKeyTimeChanged.connect([this](const ScriptPubKeyMan*, int64_t time) {
|
||||
MaybeUpdateBirthTime(time);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user