Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/active/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ void ActiveContext::Start(CConnman& connman, PeerManager& peerman, int16_t worke
cl_signer->Start();
cl_signer->RegisterRecoveryInterface();
is_signer->RegisterRecoveryInterface();
shareman->RegisterRecoveryInterface();
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💬 Nitpick: Registration inconsistency: external wiring vs self-contained constructor

CEHFSignalsHandler self-registers as a CRecoveredSigsListener in its constructor (ehf_signals.cpp:28) and unregisters in its destructor (ehf_signals.cpp:33), making it impossible to forget. In contrast, shareman, cl_signer, and is_signer rely on ActiveContext::Start()/Stop() to call RegisterRecoveryInterface() externally — which is exactly how this bug was introduced. Moving registration into each object's constructor/destructor (or its own Start()/Stop()) would prevent this class of bug. Not blocking for this PR.

source: ['claude']


RegisterValidationInterface(cl_signer.get());
}
Expand All @@ -78,6 +79,7 @@ void ActiveContext::Stop()
{
UnregisterValidationInterface(cl_signer.get());

shareman->UnregisterRecoveryInterface();
is_signer->UnregisterRecoveryInterface();
cl_signer->UnregisterRecoveryInterface();
cl_signer->Stop();
Expand Down
Loading