Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AppProxy ¶
type AppProxy interface { SubmitCh() chan []byte CommitBlock(block hashgraph.Block) (CommitResponse, error) GetSnapshot(blockIndex int) ([]byte, error) Restore(snapshot []byte) error }
AppProxy ...
type CommitCallback ¶ added in v0.4.1
type CommitCallback func(block hashgraph.Block) (CommitResponse, error)
CommitCallback ...
type CommitResponse ¶ added in v0.4.1
type CommitResponse struct { StateHash []byte InternalTransactionReceipts []hashgraph.InternalTransactionReceipt }
CommitResponse ...
func DummyCommitCallback ¶ added in v0.4.1
func DummyCommitCallback(block hashgraph.Block) (CommitResponse, error)
DummyCommitCallback is used for testing
type ProxyHandler ¶
type ProxyHandler interface { //CommitHandler is called when Babble commits a block to the application. It //returns the state hash resulting from applying the block's transactions to the //state CommitHandler(block hashgraph.Block) (response CommitResponse, err error) //SnapshotHandler is called by Babble to retrieve a snapshot corresponding to a //particular block SnapshotHandler(blockIndex int) (snapshot []byte, err error) //RestoreHandler is called by Babble to restore the application to a specific //state RestoreHandler(snapshot []byte) (stateHash []byte, err error) }
ProxyHandler ...
Click to show internal directories.
Click to hide internal directories.