From fa62a013a558338dc6ee5fb4cfd6fc7c782c301b Mon Sep 17 00:00:00 2001 From: MarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz> Date: Wed, 7 May 2025 17:11:01 +0200 Subject: [PATCH] remove dead flush() It is confusing that the chain client flush happens between StopHTTPServer and StopMapPort. Also, it is unused code. Seems best to just add it back properly when it is needed again. --- src/init.cpp | 3 --- src/interfaces/chain.h | 3 --- src/wallet/interfaces.cpp | 1 - 3 files changed, 7 deletions(-) diff --git a/src/init.cpp b/src/init.cpp index a151c9d0a9..6a0f393faf 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -298,9 +298,6 @@ void Shutdown(NodeContext& node) StopREST(); StopRPC(); StopHTTPServer(); - for (const auto& client : node.chain_clients) { - client->flush(); - } StopMapPort(); // Because these depend on each-other, we make sure that neither can be diff --git a/src/interfaces/chain.h b/src/interfaces/chain.h index c9ef46243c..6945416cce 100644 --- a/src/interfaces/chain.h +++ b/src/interfaces/chain.h @@ -407,9 +407,6 @@ public: //! Start client execution and provide a scheduler. virtual void start(CScheduler& scheduler) = 0; - //! Save state to disk. - virtual void flush() = 0; - //! Shut down client. virtual void stop() = 0; diff --git a/src/wallet/interfaces.cpp b/src/wallet/interfaces.cpp index 9ce7b5b24f..c3478455ec 100644 --- a/src/wallet/interfaces.cpp +++ b/src/wallet/interfaces.cpp @@ -578,7 +578,6 @@ public: m_context.scheduler = &scheduler; return StartWallets(m_context); } - void flush() override {} void stop() override { return StopWallets(m_context); } void setMockTime(int64_t time) override { return SetMockTime(time); } void schedulerMockForward(std::chrono::seconds delta) override { Assert(m_context.scheduler)->MockForward(delta); }