Skip to content

refactor: remove more dead code - #36820

Open
fanquake wants to merge 25 commits into
bitcoin:masterfrom
fanquake:some_more_removals
Open

fanquake wants to merge 25 commits into
bitcoin:masterfrom
fanquake:some_more_removals

Conversation

@fanquake

@fanquake fanquake commented Nov 9, 2026

Copy link
Copy Markdown
Member

Similar to #36509. Also generally related to #36167.

@DrahtBot

DrahtBot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

External sites

Reviews

See the guideline and AI policy for information on the review process.

Type Reviewers
ACK stickies-v

If your review is incorrectly listed, please copy-paste <!--meta-tag:bot-skip--> into the comment that the bot should ignore.

Conflicts

Reviewers, this pull request conflicts with the following ones:

  • #36904 (log: Remove trailing and embedded newlines from log messages by maflcko)
  • #36897 (wallet, migration: Contain all legacy wallet and migration related things in its own subdirectory, namespace, and classes by achow101)
  • #36768 (kernel: Dispatch log callbacks with btcsignals by ryanofsky)
  • #36525 (mining: add Block interface, fix template data race by Sjors)
  • #36372 (p2p: replace full outbound peers that don't support tx relay (take 2) by fjahr)
  • #36268 (refactor: prune unused semi-colons by fanquake)
  • #36167 (build: Enable -Wunused by fanquake)
  • #36122 (BIP460: CISA for Taproot key path spends by fjahr)
  • #35911 (Warn on and add missing [[noreturn]] by fanquake)
  • #34775 (kernel: allow only one global logging connection by stickies-v)

If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

@stickies-v stickies-v left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

ACK 5935ae6

Comment thread src/script/descriptor.cpp Resolved
Comment thread src/noui.cpp Resolved

@stickies-v stickies-v left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

re-ACK 1fdc122

Comment thread src/httprpc.h
void StartREST(const std::any& context);
/** Interrupt RPC REST subsystem.
*/
void InterruptREST();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not sure it technically qualifies as dead code, but InterruptHTTPRPC is also a no-op, it just logs the interruption but then doesn't actually do anything. Could be removed here as well I think?

git diff on 1fdc122
diff --git a/src/httprpc.cpp b/src/httprpc.cpp
index ad930f13ed..727af27e25 100644
--- a/src/httprpc.cpp
+++ b/src/httprpc.cpp
@@ -354,11 +354,6 @@ bool StartHTTPRPC(const std::any& context)
     return true;
 }
 
-void InterruptHTTPRPC()
-{
-    LogDebug(BCLog::RPC, "Interrupting HTTP RPC server\n");
-}
-
 void StopHTTPRPC()
 {
     LogDebug(BCLog::RPC, "Stopping HTTP RPC server\n");
diff --git a/src/httprpc.h b/src/httprpc.h
index 32ae90b5d8..41657d3ded 100644
--- a/src/httprpc.h
+++ b/src/httprpc.h
@@ -15,9 +15,6 @@ enum HTTPStatusCode : int;
  * Precondition; HTTP and RPC has been started.
  */
 bool StartHTTPRPC(const std::any& context);
-/** Interrupt HTTP RPC subsystem.
- */
-void InterruptHTTPRPC();
 /** Stop HTTP RPC subsystem.
  * Precondition; HTTP and RPC has been stopped.
  */
diff --git a/src/init.cpp b/src/init.cpp
index 7289aacd5e..f8b5f98d7a 100644
--- a/src/init.cpp
+++ b/src/init.cpp
@@ -296,7 +296,6 @@ void Interrupt(NodeContext& node)
     // Wake any threads that may be waiting for the tip to change.
     if (node.notifications) WITH_LOCK(node.notifications->m_tip_block_mutex, node.notifications->m_tip_block_cv.notify_all());
     InterruptHTTPServer();
-    InterruptHTTPRPC();
     InterruptRPC();
     if (node.tor_controller) {
         node.tor_controller->Interrupt();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants