6 #ifndef KAGOME_CHAIN_SPEC_HPP 7 #define KAGOME_CHAIN_SPEC_HPP 9 #include <libp2p/peer/peer_info.hpp> 18 using GenesisRawData = std::vector<std::pair<common::Buffer, common::Buffer>>;
29 virtual const std::string &
name()
const = 0;
31 virtual const std::string &
id()
const = 0;
33 virtual const std::string &
chainType()
const = 0;
36 virtual const std::vector<libp2p::multi::Multiaddress> &
bootNodes()
39 virtual const std::vector<std::pair<std::string, size_t>>
42 virtual const std::string &
protocolId()
const = 0;
44 virtual const std::map<std::string, std::string> &
properties()
const = 0;
46 virtual std::optional<std::reference_wrapper<const std::string>>
49 virtual const std::set<primitives::BlockHash> &
forkBlocks()
const = 0;
51 virtual const std::set<primitives::BlockHash> &
badBlocks()
const = 0;
64 virtual std::shared_ptr<const primitives::CodeSubstituteBlockIds>
79 return id().rfind(prefix, 0) == 0;
101 #endif // KAGOME_CHAIN_SPEC_HPP
virtual const std::string & name() const =0
virtual const std::set< primitives::BlockHash > & badBlocks() const =0
virtual std::shared_ptr< const primitives::CodeSubstituteBlockIds > codeSubstitutes() const =0
virtual const std::string & chainType() const =0
virtual const std::map< std::string, std::string > & properties() const =0
virtual outcome::result< common::Buffer > fetchCodeSubstituteByBlockInfo(const primitives::BlockInfo &block_info) const =0
std::vector< std::pair< common::Buffer, common::Buffer >> GenesisRawData
virtual const std::vector< libp2p::multi::Multiaddress > & bootNodes() const =0
Return ids of peer nodes of the current node.
virtual std::optional< std::reference_wrapper< const std::string > > getProperty(const std::string &property) const =0
virtual const std::string & protocolId() const =0
bool idStartsWith(std::string_view prefix) const
virtual const std::set< primitives::BlockHash > & forkBlocks() const =0
virtual const std::string & id() const =0
virtual std::optional< std::string > consensusEngine() const =0
std::map< common::Buffer, GenesisRawData > ChildrenDefaultRawData
virtual const GenesisRawData & getGenesisTopSection() const =0
virtual const std::vector< std::pair< std::string, size_t > > & telemetryEndpoints() const =0
virtual const ChildrenDefaultRawData & getGenesisChildrenDefaultSection() const =0
virtual ~ChainSpec()=default