reputation

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MinerScore

type MinerScore struct {
	Addr  string
	Score int
}

MinerScore contains a score for a miner.

type Module

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

Module consolidates different sources of information to create a reputation rank of FC miners.

func New

func New(ds datastore.TxnDatastore, mi miner.Module, fi faults.Module, ai ask.Module) *Module

New returns a new reputation Module.

func (*Module) AddSource

func (rm *Module) AddSource(id string, maddr ma.Multiaddr) error

AddSource adds a new external Source to be considered for reputation generation.

func (*Module) Close

func (rm *Module) Close() error

Close closes the reputation Module.

func (*Module) GetTopMiners

func (rm *Module) GetTopMiners(n int) ([]MinerScore, error)

GetTopMiners gets the top n miners with best score.

func (*Module) QueryMiners

func (rm *Module) QueryMiners(excludedMiners []string, countryCodes []string, trustedMiners []string) ([]MinerScore, error)

QueryMiners makes a filtered query on the scored-sorted miner list. Empty filter slices represent no-filters applied.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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