Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type API ¶
type API interface { ChainHead(context.Context) (*types.TipSet, error) ChainGetTipSet(context.Context, types.TipSetKey) (*types.TipSet, error) StateChangedActors(context.Context, cid.Cid, cid.Cid) (map[string]types.Actor, error) StateReadState(context.Context, *types.Actor, *types.TipSet) (*api.ActorState, error) ChainGetPath(context.Context, types.TipSetKey, types.TipSetKey) ([]*store.HeadChange, error) ChainGetGenesis(context.Context) (*types.TipSet, error) ChainGetTipSetByHeight(context.Context, uint64, *types.TipSet) (*types.TipSet, error) }
API provides an abstraction to a Filecoin full-node
type Service ¶
type Service struct { pb.UnimplementedAPIServer // contains filtered or unexported fields }
Service implements the gprc service
func NewService ¶
func NewService(si *SlashingIndex) *Service
NewService is a helper to create a new Service
type Slashes ¶
type Slashes struct {
Epochs []uint64
}
Slashes contains a slice of distinct epochs for a miner
type SlashingIndex ¶
type SlashingIndex struct {
// contains filtered or unexported fields
}
SlashingIndex builds and provides slashing history of miners
func New ¶
func New(ds datastore.TxnDatastore, api API) (*SlashingIndex, error)
New returns a new SlashingIndex. It will load previous state from ds, and immediatelly start getting in sync with new on-chain.
func (*SlashingIndex) Get ¶
func (s *SlashingIndex) Get() Index
Get returns a copy of the current index information
func (*SlashingIndex) Listen ¶
func (s *SlashingIndex) Listen() <-chan struct{}
Listen returns a a signaler channel which signals that index information has been updated.
func (*SlashingIndex) Unregister ¶
func (s *SlashingIndex) Unregister(c chan struct{})
Unregister frees a channel from the signaler hub
Click to show internal directories.
Click to hide internal directories.