mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-23 14:10:15 +01:00
Don't declare de facto const reference variables as non-const
This commit is contained in:
@@ -65,7 +65,7 @@ NodeContext& EnsureNodeContext(const util::Ref& context)
|
||||
|
||||
CTxMemPool& EnsureMemPool(const util::Ref& context)
|
||||
{
|
||||
NodeContext& node = EnsureNodeContext(context);
|
||||
const NodeContext& node = EnsureNodeContext(context);
|
||||
if (!node.mempool) {
|
||||
throw JSONRPCError(RPC_CLIENT_MEMPOOL_DISABLED, "Mempool disabled or instance not found");
|
||||
}
|
||||
@@ -74,7 +74,7 @@ CTxMemPool& EnsureMemPool(const util::Ref& context)
|
||||
|
||||
ChainstateManager& EnsureChainman(const util::Ref& context)
|
||||
{
|
||||
NodeContext& node = EnsureNodeContext(context);
|
||||
const NodeContext& node = EnsureNodeContext(context);
|
||||
if (!node.chainman) {
|
||||
throw JSONRPCError(RPC_INTERNAL_ERROR, "Node chainman not found");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user