Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LocalCacheItem ¶
type LocalCacheItem struct { Msg *message.TaskMessage Hash string Lock *sync.Mutex // parytyID.id -> msgHash ConfirmedList map[string]string }
LocalCacheItem used to cache the unconfirmed broadcast message
func NewLocalCacheItem ¶
func NewLocalCacheItem(msg *message.TaskMessage, hash string) *LocalCacheItem
func (*LocalCacheItem) GetPeers ¶
func (l *LocalCacheItem) GetPeers() []string
func (*LocalCacheItem) TotalConfirmParty ¶
func (l *LocalCacheItem) TotalConfirmParty() int
TotalConfirmParty counts the number of parties that already confirmed their hash
func (*LocalCacheItem) UpdateConfirmList ¶
func (l *LocalCacheItem) UpdateConfirmList(partyID, hash string)
UpdateConfirmList add the given party's hash into the confirm list
Click to show internal directories.
Click to hide internal directories.