inmemory

package
v1.3.17 Latest Latest
Warning

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

Go to latest
Published: Jul 21, 2020 License: MIT Imports: 26 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 {
	govnr.TreeSupervisor
	Nodes          []*Node
	Logger         log.Logger
	Transport      adapter.Transport
	Management     management.Provider
	VirtualChainId primitives.VirtualChainId
	MaybeClock     txPoolAdapter.Clock
}

Represents an in-process network connecting a group of in-memory Nodes together using the provided Transport

func NewNetworkWithNumOfNodes added in v0.7.11

func NewNetworkWithNumOfNodes(nodeOrder []primitives.NodeAddress, nodeConfigs []config.NodeConfig, parent log.Logger, transport adapter.Transport, managementProvider management.Provider, maybeClock txPoolAdapter.Clock, provider nodeDependencyProvider) *Network

func (*Network) CreateAndStartNodes

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

func (*Network) Destroy added in v0.7.11

func (n *Network) Destroy()

func (*Network) GetTransactionReceiptProof added in v0.7.11

func (n *Network) GetTransactionReceiptProof(ctx context.Context, txHash primitives.Sha256, nodeIndex int) *client.GetTransactionReceiptProofResponse

func (*Network) GetTransactionStatus added in v0.7.11

func (n *Network) GetTransactionStatus(ctx context.Context, txHash primitives.Sha256, nodeIndex int) *client.GetTransactionStatusResponse

func (*Network) GetVirtualChainId added in v0.7.11

func (n *Network) GetVirtualChainId() primitives.VirtualChainId

func (*Network) MetricRegistry added in v0.7.11

func (n *Network) MetricRegistry(nodeIndex int) metric.Registry

func (*Network) PublicApi

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

func (*Network) RunQuery added in v0.7.11

func (n *Network) RunQuery(ctx context.Context, builder *protocol.SignedQueryBuilder, nodeIndex int) *client.RunQueryResponse

func (*Network) SendTransaction

func (*Network) SendTransactionInBackground

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

type Node

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

Represents an in-memory Orbs node, that uses in-memory storage and communicates with its peers via in-memory gossip Useful for in-process tests and simulating Orbs chains during development

func (*Node) Destroy added in v0.7.1

func (n *Node) Destroy()

func (*Node) ExtractBlocks added in v0.7.11

func (n *Node) ExtractBlocks() ([]*protocol.BlockPairContainer, error)

func (*Node) GetPublicApi

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

func (*Node) Started

func (n *Node) Started() bool

type NodeDependencies added in v0.7.11

type NodeDependencies struct {
	Compiler                           nativeProcessorAdapter.Compiler
	EtherConnection                    ethereumAdapter.EthereumConnection
	BlockPersistence                   blockStorageAdapter.BlockPersistence
	StatePersistence                   stateStorageAdapter.StatePersistence
	StateBlockHeightReporter           stateStorageAdapter.BlockHeightReporter
	TransactionPoolBlockHeightReporter *synchronization.BlockTracker
}

Jump to

Keyboard shortcuts

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