Don't declare de facto const reference variables as non-const

This commit is contained in:
practicalswift
2020-12-06 16:11:39 +00:00
parent 1c65c075ee
commit 31b136e580
6 changed files with 8 additions and 8 deletions

View File

@@ -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");
}