Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultConfig ¶
func NewDefaultNetwork ¶
NewDefaultNetwork returns a new network using a pre-defined network configuration. The following addresses are pre-funded: X-Chain Address 1: X-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p X-Chain Address 1 Key: PrivateKey-ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN X-Chain Address 2: X-custom16045mxr3s2cjycqe2xfluk304xv3ezhkhsvkpr X-Chain Address 2 Key: PrivateKey-2fzYBh3bbWemKxQmMfX6DSuL2BFmDSLQWTvma57xwjQjtf8gFq P-Chain Address 1: P-custom18jma8ppw3nhx5r4ap8clazz0dps7rv5u9xde7p P-Chain Address 1 Key: PrivateKey-ewoqjP7PxY4yr3iLTpLisriqt94hdyDFNgchSxGGztUrTXtNN P-Chain Address 2: P-custom16045mxr3s2cjycqe2xfluk304xv3ezhkhsvkpr P-Chain Address 2 Key: PrivateKey-2fzYBh3bbWemKxQmMfX6DSuL2BFmDSLQWTvma57xwjQjtf8gFq C-Chain Address: 0x8db97C7cEcE249c2b98bDC0226Cc4C2A57BF52FC C-Chain Address Key: 56289e99c94b6912bfc12adc093c9b51124f0dc54ac7a766b2bc5ccf558d8027 The following nodes are validators: * NodeID-7Xhw2mDxuDS44j42TCB6U5579esbSt3Lg * NodeID-MFrZFVCXPv5iCn6M9K6XduxGTYp891xXZ * NodeID-NFBbbJ4qCmNaCzeW7sxErhvWqvEQMnYcN * NodeID-GWPcbFJZFfZreETSoWjPimr846mXEKCtu * NodeID-P7oB2McjBGgW2NXXWVYjV8JEDFoW9xDE5
Types ¶
type NodeConfig ¶
type NodeConfig struct {
// What type of node this is
BinaryPath string `json:"binaryPath"`
// If non-nil, direct this node's Stdout to os.Stdout
RedirectStdout bool `json:"redirectStdout"`
// If non-nil, direct this node's Stderr to os.Stderr
RedirectStderr bool `json:"redirectStderr"`
}
Node configurations which are specific to the local implementation of a network / node.
type NodeProcess ¶
type NodeProcess interface {
// Start this process
Start() error
// Send a SIGTERM to this process
Stop() error
// Returns when the process finishes exiting
Wait() error
}
Use an interface so we can mock running AvalancheGo binaries in tests
type NodeProcessCreator ¶
type NodeProcessCreator interface {
NewNodeProcess(config node.Config, args ...string) (NodeProcess, error)
}