Versions in this module Expand all Collapse all v0 v0.1.0 Feb 15, 2016 Changes in this version + func NewConsensusHandler(coord peer.MessageHandlerCoordinator, stream peer.ChatStream, ...) (peer.MessageHandler, error) + func NewHelper(mhc peer.MessageHandlerCoordinator) consensus.Stack + type ConsensusHandler struct + func (handler *ConsensusHandler) HandleMessage(msg *pb.OpenchainMessage) error + func (handler *ConsensusHandler) RequestBlocks(syncBlockRange *pb.SyncBlockRange) (<-chan *pb.SyncBlocks, error) + func (handler *ConsensusHandler) RequestStateDeltas(syncBlockRange *pb.SyncBlockRange) (<-chan *pb.SyncStateDeltas, error) + func (handler *ConsensusHandler) RequestStateSnapshot() (<-chan *pb.SyncStateSnapshot, error) + func (handler *ConsensusHandler) SendMessage(msg *pb.OpenchainMessage) error + func (handler *ConsensusHandler) Stop() error + func (handler *ConsensusHandler) To() (pb.PeerEndpoint, error) + type Helper struct + func (h *Helper) ApplyStateDelta(id interface{}, delta *statemgmt.StateDelta) error + func (h *Helper) BeginTxBatch(id interface{}) error + func (h *Helper) Broadcast(msg *pb.OpenchainMessage, peerType pb.PeerEndpoint_Type) error + func (h *Helper) CommitStateDelta(id interface{}) error + func (h *Helper) CommitTxBatch(id interface{}, metadata []byte) (*pb.Block, error) + func (h *Helper) EmptyState() error + func (h *Helper) ExecTxs(id interface{}, txs []*pb.Transaction) ([]byte, error) + func (h *Helper) GetBlock(blockNumber uint64) (block *pb.Block, err error) + func (h *Helper) GetBlockchainSize() (uint64, error) + func (h *Helper) GetCurrentStateHash() (stateHash []byte, err error) + func (h *Helper) GetNetworkHandles() (self *pb.PeerID, network []*pb.PeerID, err error) + func (h *Helper) GetNetworkInfo() (self *pb.PeerEndpoint, network []*pb.PeerEndpoint, err error) + func (h *Helper) GetRemoteBlocks(replicaID *pb.PeerID, start, finish uint64) (<-chan *pb.SyncBlocks, error) + func (h *Helper) GetRemoteStateDeltas(replicaID *pb.PeerID, start, finish uint64) (<-chan *pb.SyncStateDeltas, error) + func (h *Helper) GetRemoteStateSnapshot(replicaID *pb.PeerID) (<-chan *pb.SyncStateSnapshot, error) + func (h *Helper) HashBlock(block *pb.Block) ([]byte, error) + func (h *Helper) PreviewCommitTxBatch(id interface{}, metadata []byte) (*pb.Block, error) + func (h *Helper) PutBlock(blockNumber uint64, block *pb.Block) error + func (h *Helper) RollbackStateDelta(id interface{}) error + func (h *Helper) RollbackTxBatch(id interface{}) error + func (h *Helper) Sign(msg []byte) ([]byte, error) + func (h *Helper) Unicast(msg *pb.OpenchainMessage, receiverHandle *pb.PeerID) error + func (h *Helper) Verify(replicaID *pb.PeerID, signature []byte, message []byte) error + func (h *Helper) VerifyBlockchain(start, finish uint64) (uint64, error)