mirror of
https://github.com/luxfi/netrunner.git
synced 2026-07-27 00:04:23 +00:00
add missing files
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
package networkrunner
|
||||
|
||||
import (
|
||||
oldrunner "github.com/ava-labs/avalanche-testing/avalanche/builder/networkrunner"
|
||||
)
|
||||
|
||||
// Issues API calls to a node
|
||||
type APIClient interface {
|
||||
// TODO add methods
|
||||
GetNodeRunner() *oldrunner.NodeRunner
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
package networkrunner
|
||||
|
||||
type NetworkContext interface {
|
||||
Fatal(error)
|
||||
}
|
||||
@@ -28,4 +28,3 @@ type NetworkConfig struct {
|
||||
CoreConfigFlags []byte
|
||||
NodeConfigs []NodeConfig
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
package networkrunner
|
||||
|
||||
import (
|
||||
"github.com/ava-labs/avalanchego/ids"
|
||||
)
|
||||
|
||||
const (
|
||||
AVALANCHEGO = iota
|
||||
BYZANTINE = iota
|
||||
)
|
||||
|
||||
// An AvalancheGo node
|
||||
type Node interface {
|
||||
// Each node has a unique ID that distinguishes it from
|
||||
// other nodes in this network.
|
||||
// This is distinct from the Avalanche notion of a node ID.
|
||||
// This ID is assigned by the Network; it is not the hash
|
||||
// of a staking certificate.
|
||||
// We don't use the Avalanche node ID to reference nodes
|
||||
// because we may want to start a network where multiple nodes
|
||||
// have the same Avalanche node ID.
|
||||
GetID() ids.ID
|
||||
// Return this node's Avalanche node ID.
|
||||
//GetNodeID() ids.ShortID
|
||||
// Return a client that can be used to
|
||||
GetAPIClient() APIClient
|
||||
// TODO add methods
|
||||
}
|
||||
|
||||
type NodeConfig struct {
|
||||
BinKind int
|
||||
NodeID string
|
||||
PrivateKey []byte
|
||||
Cert []byte
|
||||
ConfigFlags []byte
|
||||
}
|
||||
Reference in New Issue
Block a user