Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SkynetBlacklist ¶
type SkynetBlacklist struct {
// contains filtered or unexported fields
}
SkynetBlacklist manages a set of blacklisted publinks by tracking the merkleroots and persists the list to disk.
func New ¶
func New(persistDir string) (*SkynetBlacklist, error)
New returns an initialized SkynetBlacklist.
func (*SkynetBlacklist) Blacklist ¶
func (sb *SkynetBlacklist) Blacklist() []crypto.Hash
Blacklist returns the hashes of the merkleroots that are blacklisted
func (*SkynetBlacklist) Close ¶
func (sb *SkynetBlacklist) Close() error
Close closes and frees associated resources.
func (*SkynetBlacklist) IsBlacklisted ¶
func (sb *SkynetBlacklist) IsBlacklisted(publink modules.Publink) bool
IsBlacklisted indicates if a publink is currently blacklisted
func (*SkynetBlacklist) UpdateBlacklist ¶
func (sb *SkynetBlacklist) UpdateBlacklist(additions, removals []modules.Publink) error
UpdateBlacklist updates the list of publinks that are blacklisted.
Click to show internal directories.
Click to hide internal directories.