Skip to content

Commit 556d0b8

Browse files
committed
refactor: move dtor to source file, delete extra ctors for notif int.
1 parent 5dd2e99 commit 556d0b8

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

src/dsnotificationinterface.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,18 @@ CDSNotificationInterface::CDSNotificationInterface(CConnman& connman,
2727
const ChainstateManager& chainman,
2828
const std::unique_ptr<CDeterministicMNManager>& dmnman,
2929
const std::unique_ptr<LLMQContext>& llmq_ctx) :
30-
m_connman(connman),
31-
m_dstxman(dstxman),
32-
m_mn_sync(mn_sync),
33-
m_govman(govman),
34-
m_chainman(chainman),
35-
m_dmnman(dmnman),
36-
m_llmq_ctx(llmq_ctx)
30+
m_connman{connman},
31+
m_dstxman{dstxman},
32+
m_mn_sync{mn_sync},
33+
m_govman{govman},
34+
m_chainman{chainman},
35+
m_dmnman{dmnman},
36+
m_llmq_ctx{llmq_ctx}
3737
{
3838
}
3939

40+
CDSNotificationInterface::~CDSNotificationInterface() = default;
41+
4042
void CDSNotificationInterface::InitializeCurrentBlockTip()
4143
{
4244
SynchronousUpdatedBlockTip(m_chainman.ActiveChain().Tip(), nullptr, m_chainman.ActiveChainstate().IsInitialBlockDownload());

src/dsnotificationinterface.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,17 @@ struct LLMQContext;
1818
class CDSNotificationInterface : public CValidationInterface
1919
{
2020
public:
21+
CDSNotificationInterface() = delete;
22+
CDSNotificationInterface(const CDSNotificationInterface&) = delete;
23+
CDSNotificationInterface& operator=(const CDSNotificationInterface&) = delete;
2124
explicit CDSNotificationInterface(CConnman& connman,
2225
CDSTXManager& dstxman,
2326
CMasternodeSync& mn_sync,
2427
CGovernanceManager& govman,
2528
const ChainstateManager& chainman,
2629
const std::unique_ptr<CDeterministicMNManager>& dmnman,
2730
const std::unique_ptr<LLMQContext>& llmq_ctx);
28-
virtual ~CDSNotificationInterface() = default;
31+
virtual ~CDSNotificationInterface();
2932

3033
// a small helper to initialize current block height in sub-modules on startup
3134
void InitializeCurrentBlockTip();

src/masternode/active/notificationinterface.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ ActiveNotificationInterface::ActiveNotificationInterface(ActiveContext& active_c
1616
{
1717
}
1818

19+
ActiveNotificationInterface::~ActiveNotificationInterface() = default;
20+
1921
void ActiveNotificationInterface::UpdatedBlockTip(const CBlockIndex* pindexNew, const CBlockIndex* pindexFork,
2022
bool fInitialDownload)
2123
{

src/masternode/active/notificationinterface.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ class ActiveNotificationInterface final : public CValidationInterface
2020
public:
2121
ActiveNotificationInterface() = delete;
2222
ActiveNotificationInterface(const ActiveNotificationInterface&) = delete;
23+
ActiveNotificationInterface& operator=(const ActiveNotificationInterface&) = delete;
2324
explicit ActiveNotificationInterface(ActiveContext& active_ctx, CActiveMasternodeManager& mn_activeman);
24-
virtual ~ActiveNotificationInterface() = default;
25+
virtual ~ActiveNotificationInterface();
2526

2627
protected:
2728
// CValidationInterface

0 commit comments

Comments
 (0)