Documentation
¶
Index ¶
- type Backend
- type FakeEC
- func (ec *FakeEC) GetCurrentHead() int64
- func (ec *FakeEC) GetHead(ctx context.Context) (TipSet, error)
- func (ec *FakeEC) GetParent(ctx context.Context, ts TipSet) (TipSet, error)
- func (ec *FakeEC) GetPowerTable(ctx context.Context, tsk gpbft.TipSetKey) (gpbft.PowerEntries, error)
- func (ec *FakeEC) GetTipset(ctx context.Context, tsk gpbft.TipSetKey) (TipSet, error)
- func (ec *FakeEC) GetTipsetByEpoch(ctx context.Context, epoch int64) (TipSet, error)
- func (ec *FakeEC) Pause()
- func (ec *FakeEC) Resume()
- type TipSet
- type Tipset
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface {
// GetTipsetByEpoch should return the tipset immediately before the one requested.
// If the epoch requested is null, it returns the latest not-null one.
GetTipsetByEpoch(ctx context.Context, epoch int64) (TipSet, error)
// GetTipset returns the tipset with the given key.
GetTipset(context.Context, gpbft.TipSetKey) (TipSet, error)
// GetHead returns the current head tipset of the chain
GetHead(context.Context) (TipSet, error)
// GetParent returns the parent of the current tipset.
GetParent(context.Context, TipSet) (TipSet, error)
// GetPowerTable returns the power table at the tipset given as an argument.
GetPowerTable(context.Context, gpbft.TipSetKey) (gpbft.PowerEntries, error)
}
func WithModifiedPower ¶
func WithModifiedPower(backend Backend, explicitPower gpbft.PowerEntries, ignoreEcPower bool) Backend
type FakeEC ¶
type FakeEC struct {
// contains filtered or unexported fields
}
func (*FakeEC) GetCurrentHead ¶
func (*FakeEC) GetPowerTable ¶
func (*FakeEC) GetTipsetByEpoch ¶
GetTipsetByHeight should return a tipset or nil/empty byte array if it does not exists
Click to show internal directories.
Click to hide internal directories.