diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-06-14 14:17:24 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-06-15 07:39:35 -0400 |
commit | fab80fef61ddd4afeff6e497c7e76bffcd05e8a4 (patch) | |
tree | 18eee04e36fc7dc2fc30c82da3608b7df4d2fca8 /src/rpc | |
parent | fa34587f1c811d99200453b0936219c473f514b0 (diff) |
refactor: Remove unused EnsureChainman
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/blockchain.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp index 8252af3ee6..cd1b27490d 100644 --- a/src/rpc/blockchain.cpp +++ b/src/rpc/blockchain.cpp @@ -75,7 +75,10 @@ CTxMemPool& EnsureMemPool(const util::Ref& context) ChainstateManager& EnsureChainman(const util::Ref& context) { NodeContext& node = EnsureNodeContext(context); - return EnsureChainman(node); + if (!node.chainman) { + throw JSONRPCError(RPC_INTERNAL_ERROR, "Node chainman not found"); + } + return *node.chainman; } /* Calculate the difficulty for a given block index. |