inmemory

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2018 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Network

type Network struct {
	Nodes     []*Node
	Logger    log.BasicLogger
	Transport adapter.Transport
}

func NewNetwork

func NewNetwork(logger log.BasicLogger, transport adapter.Transport) Network

func (*Network) AddNode

func (n *Network) AddNode(nodeKeyPair *keys.Ed25519KeyPair, cfg config.NodeConfig, compiler nativeProcessorAdapter.Compiler, logger log.BasicLogger)

func (*Network) CallMethod

func (n *Network) CallMethod(ctx context.Context, tx *protocol.TransactionBuilder, nodeIndex int) chan uint64

func (*Network) CreateAndStartNodes

func (n *Network) CreateAndStartNodes(ctx context.Context, numOfNodesToStart int)

func (*Network) GetBlockPersistence

func (n *Network) GetBlockPersistence(nodeIndex int) blockStorageAdapter.InMemoryBlockPersistence

func (*Network) GetStatePersistence

func (n *Network) GetStatePersistence(i int) stateStorageAdapter.TamperingStatePersistence

func (*Network) PublicApi

func (n *Network) PublicApi(nodeIndex int) services.PublicApi

func (*Network) SendTransaction

func (n *Network) SendTransaction(ctx context.Context, tx *protocol.SignedTransactionBuilder, nodeIndex int) chan *client.SendTransactionResponse

func (*Network) SendTransactionInBackground

func (n *Network) SendTransactionInBackground(ctx context.Context, tx *protocol.SignedTransactionBuilder, nodeIndex int)

func (*Network) Size

func (n *Network) Size() int

func (*Network) WaitForTransactionInState

func (n *Network) WaitForTransactionInState(ctx context.Context, txhash primitives.Sha256)

type NetworkDriver

type NetworkDriver interface {
	contracts.ContractAPI
	PublicApi(nodeIndex int) services.PublicApi
	Size() int
}

type Node

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

func (*Node) GetCompiler

func (n *Node) GetCompiler() nativeProcessorAdapter.Compiler

func (*Node) GetPublicApi

func (n *Node) GetPublicApi() services.PublicApi

func (*Node) Started

func (n *Node) Started() bool

func (*Node) WaitForTransactionInState

func (n *Node) WaitForTransactionInState(ctx context.Context, txhash primitives.Sha256)

Jump to

Keyboard shortcuts

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