protocols

package
v0.0.0-...-979e23b Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KnownCache

type KnownCache struct {
	// contains filtered or unexported fields
}

KnownCache is a cache for known hashes.

func NewKnownCache

func NewKnownCache(max int) *KnownCache

NewKnownCache creates a new knownCache with a max capacity.

func (*KnownCache) Add

func (k *KnownCache) Add(hashes ...common.Hash)

Add adds a list of elements to the set.

func (*KnownCache) Cardinality

func (k *KnownCache) Cardinality() int

Cardinality returns the number of elements in the set.

func (*KnownCache) Contains

func (k *KnownCache) Contains(hash common.Hash) bool

Contains returns whether the given item is in the set.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL