Documentation ¶
Index ¶
- type Block
- type Cache
- func (me *Cache[Peer, BlockKey, Hash]) CheckBlock(key BlockKey, data []byte) (bad []Peer)
- func (me *Cache[Peer, BlockKey, Hash]) ForgetBlock(key BlockKey)
- func (me *Cache[Peer, BlockKey, Hash]) HasBlocks() bool
- func (me *Cache[Peer, BlockKey, Hash]) Init()
- func (me *Cache[Peer, BlockKey, Hash]) RecordBlock(peer Peer, key BlockKey, data []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
type Cache[Peer, BlockKey, Hash comparable] struct { Hash func([]byte) Hash // contains filtered or unexported fields }
func (*Cache[Peer, BlockKey, Hash]) CheckBlock ¶
func (*Cache[Peer, BlockKey, Hash]) ForgetBlock ¶
func (me *Cache[Peer, BlockKey, Hash]) ForgetBlock(key BlockKey)
func (*Cache[Peer, BlockKey, Hash]) RecordBlock ¶
Click to show internal directories.
Click to hide internal directories.