Documentation ¶
Index ¶
- type Network
- func (n *Network) AddNode(nodeKeyPair *keys.Ed25519KeyPair, cfg config.NodeConfig, ...)
- func (n *Network) CallMethod(ctx context.Context, tx *protocol.TransactionBuilder, nodeIndex int) chan uint64
- func (n *Network) CreateAndStartNodes(ctx context.Context, numOfNodesToStart int)
- func (n *Network) GetBlockPersistence(nodeIndex int) blockStorageAdapter.InMemoryBlockPersistence
- func (n *Network) GetStatePersistence(i int) stateStorageAdapter.TamperingStatePersistence
- func (n *Network) PublicApi(nodeIndex int) services.PublicApi
- func (n *Network) SendTransaction(ctx context.Context, tx *protocol.SignedTransactionBuilder, nodeIndex int) chan *client.SendTransactionResponse
- func (n *Network) SendTransactionInBackground(ctx context.Context, tx *protocol.SignedTransactionBuilder, nodeIndex int)
- func (n *Network) Size() int
- func (n *Network) WaitForTransactionInState(ctx context.Context, txhash primitives.Sha256)
- type NetworkDriver
- type Node
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 (*Network) CreateAndStartNodes ¶
func (*Network) GetBlockPersistence ¶
func (n *Network) GetBlockPersistence(nodeIndex int) blockStorageAdapter.InMemoryBlockPersistence
func (*Network) GetStatePersistence ¶
func (n *Network) GetStatePersistence(i int) stateStorageAdapter.TamperingStatePersistence
func (*Network) SendTransaction ¶
func (n *Network) SendTransaction(ctx context.Context, tx *protocol.SignedTransactionBuilder, nodeIndex int) chan *client.SendTransactionResponse
func (*Network) SendTransactionInBackground ¶
func (*Network) WaitForTransactionInState ¶
func (n *Network) WaitForTransactionInState(ctx context.Context, txhash primitives.Sha256)
type NetworkDriver ¶
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
func (*Node) GetCompiler ¶
func (n *Node) GetCompiler() nativeProcessorAdapter.Compiler
func (*Node) GetPublicApi ¶
func (*Node) WaitForTransactionInState ¶
func (n *Node) WaitForTransactionInState(ctx context.Context, txhash primitives.Sha256)
Click to show internal directories.
Click to hide internal directories.