Documentation ¶
Index ¶
- type Network
- func (n *Network) CreateAndStartNodes(ctx context.Context, numOfNodesToStart int)
- func (n *Network) Destroy()
- func (n *Network) GetTransactionReceiptProof(ctx context.Context, txHash primitives.Sha256, nodeIndex int) *client.GetTransactionReceiptProofResponse
- func (n *Network) GetTransactionStatus(ctx context.Context, txHash primitives.Sha256, nodeIndex int) *client.GetTransactionStatusResponse
- func (n *Network) GetVirtualChainId() primitives.VirtualChainId
- func (n *Network) MetricRegistry(nodeIndex int) metric.Registry
- func (n *Network) PublicApi(nodeIndex int) services.PublicApi
- func (n *Network) RunQuery(ctx context.Context, builder *protocol.SignedQueryBuilder, nodeIndex int) *client.RunQueryResponse
- func (n *Network) SendTransaction(ctx context.Context, builder *protocol.SignedTransactionBuilder, nodeIndex int) (*client.SendTransactionResponse, primitives.Sha256)
- func (n *Network) SendTransactionInBackground(ctx context.Context, builder *protocol.SignedTransactionBuilder, nodeIndex int)
- type Node
- type NodeDependencies
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.Logger Transport adapter.Transport VirtualChainId primitives.VirtualChainId }
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( validators map[string]config.ValidatorNode, nodeOrder []primitives.NodeAddress, privateKeys map[string]primitives.EcdsaSecp256K1PrivateKey, parent log.Logger, cfgTemplate config.OverridableConfig, transport adapter.Transport, provider nodeDependencyProvider, ) *Network
func (*Network) CreateAndStartNodes ¶
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 (*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 (n *Network) SendTransaction(ctx context.Context, builder *protocol.SignedTransactionBuilder, nodeIndex int) (*client.SendTransactionResponse, primitives.Sha256)
func (*Network) SendTransactionInBackground ¶
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) ExtractBlocks ¶ added in v0.7.11
func (n *Node) ExtractBlocks() ([]*protocol.BlockPairContainer, error)
func (*Node) GetPublicApi ¶
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 }
Click to show internal directories.
Click to hide internal directories.