Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RandomTCPPort ¶
RandomTCPPort returns a new random tcp port
Types ¶
type NetworkFactory ¶
NetworkFactory is a generic factory for network instances
type NodeKeys ¶
type NodeKeys struct { NetKey *ecdsa.PrivateKey OperatorKey *rsa.PrivateKey }
NodeKeys holds node's keys
func CreateKeys ¶
CreateKeys creates <n> random node keys
func NewLocalTestnet ¶ added in v1.1.0
func NewLocalTestnet(ctx context.Context, n int, factory NetworkFactory) ([]network.P2PNetwork, []NodeKeys, error)
NewLocalTestnet creates a new local network
type UDPPortsRandomizer ¶
UDPPortsRandomizer helps to generate random, available udp ports
func (UDPPortsRandomizer) Next ¶
func (up UDPPortsRandomizer) Next(from, to int) int
Next generates a new random port that is available
Click to show internal directories.
Click to hide internal directories.