simulator

package
v0.0.0-...-dde17ac Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 24, 2018 License: GPL-3.0 Imports: 12 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Simulator

type Simulator struct {
	// contains filtered or unexported fields
}

Simulator is a service in a shard node that simulates requests from remote notes coming over the shardp2p network. For example, if we are running a proposer service, we would want to simulate voter requests requests coming to us via a p2p feed. This service will be removed once p2p internals and end-to-end testing across remote nodes have been implemented.

func NewSimulator

func NewSimulator(config *params.Config, client *mainchain.VRCClient, p2p *p2p.Server, shardID int, delay time.Duration) (*Simulator, error)

NewSimulator creates a struct instance of a simulator service. It will have access to config, a mainchain client, a p2p server, and a shardID.

func (*Simulator) Start

func (s *Simulator) Start()

Start the main loop for simulating p2p requests.

func (*Simulator) Stop

func (s *Simulator) Stop() error

Stop the main loop for simulator requests.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL