Documentation
¶
Index ¶
- func CurrentChainID(ctx context.Context) *big.Int
- func CurrentChainName(ctx context.Context) string
- func HTTPHost(n Node) string
- func Logger(ctx context.Context) log.Logger
- type Context
- func AsContext(ctx context.Context) Context
- func WithCurrentNetwork(ctx context.Context, selector interface{}) Context
- func WithCurrentNode(ctx context.Context, selector interface{}) Context
- func WithDevnet(ctx context.Context, devnet Devnet, logger log.Logger) Context
- func WithNetwork(ctx context.Context, nw *Network) Context
- type Devnet
- type Network
- func (nw *Network) BlockProducers() []Node
- func (nw *Network) ChainID() *big.Int
- func (nw *Network) FirstNode() Node
- func (nw *Network) NonBlockProducers() []Node
- func (nw *Network) SelectNode(ctx context.Context, selector interface{}) Node
- func (nw *Network) Start(ctx context.Context) error
- func (nw *Network) Stop()
- func (nw *Network) Wait()
- type NetworkSelector
- type NetworkSelectorFunc
- type Node
- type NodeSelector
- type NodeSelectorFunc
- type Service
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CurrentChainName ¶
Types ¶
type Context ¶
type Context interface { context.Context WithValue(key, value interface{}) Context WithCurrentNetwork(selector interface{}) Context WithCurrentNode(selector interface{}) Context }
func WithCurrentNetwork ¶
func WithCurrentNode ¶
type Network ¶
type Network struct { DataDir string Chain string Logger log.Logger BasePort int BasePrivateApiAddr string BaseRPCHost string BaseRPCPort int Snapshots bool Nodes []Node Services []Service Genesis *types.Genesis BorStateSyncDelay time.Duration BorPeriod time.Duration BorMinBlockSize int BorWithMilestones *bool // max number of blocks to look for a transaction in MaxNumberOfEmptyBlockChecks int // contains filtered or unexported fields }
func CurrentNetwork ¶
func (*Network) BlockProducers ¶
func (*Network) NonBlockProducers ¶
func (*Network) SelectNode ¶
type NetworkSelector ¶
type NetworkSelectorFunc ¶
type Node ¶
type Node interface { requests.RequestGenerator GetName() string ChainID() *big.Int GetHttpPort() int GetEnodeURL() string Account() *accounts.Account IsBlockProducer() bool Configure(baseNode args.NodeArgs, nodeNumber int) error EnableMetrics(port int) }
func CurrentNode ¶
func SelectBlockProducer ¶
func SelectNode ¶
func SelectNonBlockProducer ¶
type NodeSelectorFunc ¶
Click to show internal directories.
Click to hide internal directories.