6 #ifndef KAGOME_CORE_CONSENSUS_GRANDPA_CHAIN_HPP 7 #define KAGOME_CORE_CONSENSUS_GRANDPA_CHAIN_HPP 22 virtual ~Chain() =
default;
28 virtual outcome::result<bool>
hasBlock(
36 virtual outcome::result<std::vector<primitives::BlockHash>>
getAncestry(
56 std::optional<VoterSetId> voter_set_id)
const = 0;
64 return base == block ?
true :
hasAncestry(base, block);
70 #endif // KAGOME_CORE_CONSENSUS_GRANDPA_CHAIN_HPP
virtual outcome::result< std::vector< primitives::BlockHash > > getAncestry(const primitives::BlockHash &base, const primitives::BlockHash &block) const =0
Get the ancestry of a {.
virtual outcome::result< bool > hasBlock(const primitives::BlockHash &block) const =0
Checks if {.
virtual bool hasAncestry(const primitives::BlockHash &base, const primitives::BlockHash &block) const =0
Check if block is ancestor for second one.
virtual outcome::result< BlockInfo > bestChainContaining(const primitives::BlockHash &base, std::optional< VoterSetId > voter_set_id) const =0
bool isEqualOrDescendOf(const primitives::BlockHash &base, const primitives::BlockHash &block) const