Skip to content

Commit 7e88f61

Browse files
committed
multiprocess: Make interfaces::Chain::isTaprootActive non-const
interfaces::Chain is an abstract class, so declaring the method const would be exposing internal implementation details of subclasses to interface callers. And specifically this doesn't work because the multiprocess implementation of the interfaces::Chain::isTaprootActive method can't be const because IPC connection state and request state is not constant during the call.
1 parent 6ef84e0 commit 7e88f61

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/interfaces/chain.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ class Chain
289289
virtual void requestMempoolTransactions(Notifications& notifications) = 0;
290290

291291
//! Check if Taproot has activated
292-
virtual bool isTaprootActive() const = 0;
292+
virtual bool isTaprootActive() = 0;
293293
};
294294

295295
//! Interface to let node manage chain clients (wallets, or maybe tools for

src/node/interfaces.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ class ChainImpl : public Chain
698698
notifications.transactionAddedToMempool(entry.GetSharedTx(), 0 /* mempool_sequence */);
699699
}
700700
}
701-
bool isTaprootActive() const override
701+
bool isTaprootActive() override
702702
{
703703
LOCK(::cs_main);
704704
const CBlockIndex* tip = Assert(m_node.chainman)->ActiveChain().Tip();

0 commit comments

Comments
 (0)