Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SaveCacheUpdates ¶ added in v0.1.5
SaveCacheUpdates is called on the committing peer to save the state cache updates so that the results may be published to an endorsing peer when asked for via a Gossip request.
func UpdateCache ¶ added in v0.1.5
UpdateCache is called on the endorsing peer to pre-populate the state cache. When a validated block is received from the committing peer, a Gossip request is made to the committing peer for cache-updates for that block. When the cache-updates are received then the cache on the endorsing peer is updated (pre-populated).
Types ¶
type Providers ¶ added in v0.1.6
type Providers struct { BPProvider blockPublisherProvider MgrProvider ccEventMgrProvider MspProvider mspProvider GossipProvider common.GossipProvider StateDBProvider stateDBProvider HandlerRegistry appDataHandlerRegistry }
Providers contains the dependencies of the update handler
type UpdateHandler ¶
type UpdateHandler struct { *Providers // contains filtered or unexported fields }
UpdateHandler handles updates to LSCC state and the state cache. As blocks are committed, the state cache is updated on the committing peer and the cache-updates are temporarily stored. When an endorsing peer receives a validated block from the committing peer, a request is made to the committing peer for the cache-updates. When the cache-updates are received then the cache on the endorsing peer is updated (pre-populated).
func NewUpdateHandler ¶
func NewUpdateHandler(providers *Providers) *UpdateHandler
NewUpdateHandler returns a new state update handler.
func (*UpdateHandler) ChannelJoined ¶
func (h *UpdateHandler) ChannelJoined(channelID string)
ChannelJoined is called when a peer joins a channel