mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-05-12 12:53:31 +02:00
Merge bitcoin/bitcoin#23003: multiprocess: Make interfaces::Chain::isTaprootActive non-const
7e88f61b285e6a356ea4f6ba384858f109559985 multiprocess: Make interfaces::Chain::isTaprootActive non-const (Russell Yanofsky)
Pull request description:
`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.
---
This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/projects/10).
ACKs for top commit:
jamesob:
ACK 7e88f61b28
Tree-SHA512: 1c5ed89870aeb7170b9048c41299ab650dfa3d0978088e08c4c866fa0babb292722710b16f25540f26667220cb4747b1c256c4bd42893c552291eccc155346a3
This commit is contained in:
commit
a9f6428708
@ -289,7 +289,7 @@ public:
|
||||
virtual void requestMempoolTransactions(Notifications& notifications) = 0;
|
||||
|
||||
//! Check if Taproot has activated
|
||||
virtual bool isTaprootActive() const = 0;
|
||||
virtual bool isTaprootActive() = 0;
|
||||
};
|
||||
|
||||
//! Interface to let node manage chain clients (wallets, or maybe tools for
|
||||
|
@ -698,7 +698,7 @@ public:
|
||||
notifications.transactionAddedToMempool(entry.GetSharedTx(), 0 /* mempool_sequence */);
|
||||
}
|
||||
}
|
||||
bool isTaprootActive() const override
|
||||
bool isTaprootActive() override
|
||||
{
|
||||
LOCK(::cs_main);
|
||||
const CBlockIndex* tip = Assert(m_node.chainman)->ActiveChain().Tip();
|
||||
|
Loading…
x
Reference in New Issue
Block a user