add missing files

This commit is contained in:
Felipe Madero
2021-10-23 01:33:12 -03:00
parent 6e439126ce
commit 44b61f52bf
4 changed files with 52 additions and 1 deletions
+11
View File
@@ -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
}
+5
View File
@@ -0,0 +1,5 @@
package networkrunner
type NetworkContext interface {
Fatal(error)
}
-1
View File
@@ -28,4 +28,3 @@ type NetworkConfig struct {
CoreConfigFlags []byte
NodeConfigs []NodeConfig
}
+36
View File
@@ -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
}