Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DummyClient ¶
type DummyClient struct {
// contains filtered or unexported fields
}
func NewDummyClient ¶
func (*DummyClient) Connect ¶
Connect establishes (in parallel) network connections to all nodes in the system. The nodes' Transactionreceivers must be running. Only after Connect() returns, sending transactions through this DummyClient is possible. TODO: Deal with errors, e.g. when the connection times out (make sure the RPC call in connectToNode() has a timeout).
func (*DummyClient) Disconnect ¶
func (dc *DummyClient) Disconnect()
Disconnect closes all open connections to Mir nodes.
func (*DummyClient) SubmitTransaction ¶
func (dc *DummyClient) SubmitTransaction(data []byte) error
SubmitTransaction submits a transaction by sending it to all nodes (as configured when creating the DummyClient). It automatically appends meta-info like client ID and transaction number. SubmitTransaction must not be called concurrently. If an error occurs, SubmitTransaction returns immediately, even if sending of the transaction was not attempted for all nodes.