Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitStore ¶ added in v0.6.2
func InitStore(ctx context.Context, cfg Config, net params.Network, s header.Store, ex header.Exchange) error
InitStore initializes the store.
func P2PExchange ¶
P2PExchange constructs new Exchange for headers.
func WithMetrics ¶ added in v0.7.0
TODO: Eventually we should have a per-module metrics option. WithMetrics enables metrics exporting for the node.
Types ¶
type Config ¶
type Config struct {
// TrustedHash is the Block/Header hash that Nodes use as starting point for header synchronization.
// Only affects the node once on initial sync.
TrustedHash string
// TrustedPeers are the peers we trust to fetch headers from.
// Note: The trusted does *not* imply Headers are not verified, but trusted as reliable to fetch headers
// at any moment.
TrustedPeers []string
}
Config contains configuration parameters for header retrieval and management.
func DefaultConfig ¶
func DefaultConfig() Config
Click to show internal directories.
Click to hide internal directories.