refactor: Remove unused EnsureChainman

This commit is contained in:
MarcoFalke 2020-06-14 14:17:24 -04:00
parent fa34587f1c
commit fab80fef61
No known key found for this signature in database
GPG key ID: CE2B75697E69A548
3 changed files with 7 additions and 9 deletions

View file

@ -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.