Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MinerScore ¶
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.MinerIndex, si *slashing.SlashingIndex, ai *ask.AskIndex) *Module
New returns a new reputation Module
func (*Module) AddSource ¶
AddSource adds a new external Source to be considered for reputation generation
func (*Module) GetTopMiners ¶
func (rm *Module) GetTopMiners(n int) ([]MinerScore, error)
GetTopMiners gets the top n miners with best score
type Service ¶
type Service struct { pb.UnimplementedAPIServer // contains filtered or unexported fields }
Service implements the gprc service
func NewService ¶
NewService is a helper to create a new Service
func (*Service) AddSource ¶
func (s *Service) AddSource(ctx context.Context, req *pb.AddSourceRequest) (*pb.AddSourceReply, error)
AddSource calls Module.AddSource
func (*Service) GetTopMiners ¶
func (s *Service) GetTopMiners(ctx context.Context, req *pb.GetTopMinersRequest) (*pb.GetTopMinersReply, error)
GetTopMiners calls Module.GetTopMiners
Click to show internal directories.
Click to hide internal directories.