Documentation ¶
Index ¶
- Variables
- func DatabaseAvailable() bool
- func DatabaseOptions() string
- func FakeBlockHeader(t testing.TB, height int64, stateRoot cid.Cid) *types.BlockHeader
- func FakeTipset(t testing.TB) *types.TipSet
- func MustFakeTipSet(t *testing.T, height int64) *types.TipSet
- func MustMakeAddress(t *testing.T, id uint64) address.Address
- func NewAPIWrapper(node *itestkit.TestFullNode) lens.API
- func NewMockClock() *clock.Mock
- func RandomCid() cid.Cid
- func TruncateBlockTables(tb testing.TB, db *pg.DB) error
- func WaitForExclusiveDatabase(ctx context.Context, tb testing.TB) (*pg.DB, func() error, error)
- func WaitForExclusiveDatabaseLock(ctx context.Context, db *pg.DB) (func() error, error)
- type APIWrapper
- func (aw *APIWrapper) BurnFundsFn(ctx context.Context, ts *types.TipSet) (lens.ShouldBurnFn, error)
- func (aw *APIWrapper) ChainGetTipSetAfterHeight(ctx context.Context, epoch abi.ChainEpoch, key types.TipSetKey) (*types.TipSet, error)
- func (aw *APIWrapper) CirculatingSupply(ctx context.Context, key types.TipSetKey) (api.CirculatingSupply, error)
- func (aw *APIWrapper) ComputeBaseFee(ctx context.Context, ts *types.TipSet) (abi.TokenAmount, error)
- func (aw *APIWrapper) Context() context.Context
- func (aw *APIWrapper) Get(ctx context.Context, c cid.Cid, out interface{}) error
- func (aw *APIWrapper) GetMessageExecutionsForTipSet(ctx context.Context, ts, pts *types.TipSet) ([]*lens.MessageExecution, error)
- func (aw *APIWrapper) MessagesForTipSetBlocks(ctx context.Context, ts *types.TipSet) ([]*lens.BlockMessages, error)
- func (aw *APIWrapper) MessagesWithDeduplicationForTipSet(ctx context.Context, ts *types.TipSet) (map[cid.Cid]types.ChainMsg, error)
- func (aw *APIWrapper) Put(ctx context.Context, v interface{}) (cid.Cid, error)
- func (aw *APIWrapper) StateGetReceipt(ctx context.Context, msg cid.Cid, from types.TipSetKey) (*types.MessageReceipt, error)
- func (aw *APIWrapper) Store() adt.Store
- func (aw *APIWrapper) TipSetMessageReceipts(ctx context.Context, ts, pts *types.TipSet) ([]*lens.BlockMessageReceipts, error)
- type BlockHeaderList
Constants ¶
This section is empty.
Variables ¶
var KnownTime = time.Unix(1601378000, 0).UTC()
Functions ¶
func DatabaseAvailable ¶
func DatabaseAvailable() bool
DatabaseAvailable reports whether a database is available for testing
func DatabaseOptions ¶
func DatabaseOptions() string
Database returns the connection string for connecting to the test database
func FakeBlockHeader ¶
func FakeBlockHeader(t testing.TB, height int64, stateRoot cid.Cid) *types.BlockHeader
func MustFakeTipSet ¶ added in v0.10.1
func MustMakeAddress ¶ added in v0.10.1
func NewAPIWrapper ¶
func NewAPIWrapper(node *itestkit.TestFullNode) lens.API
func NewMockClock ¶
func TruncateBlockTables ¶ added in v0.10.0
TruncateBlockTables ensures the indexing tables are empty
func WaitForExclusiveDatabase ¶
WaitForExclusiveDatabase waits for exclusive access to the test database until the context is done or the exclusive access is granted. It returns a cleanup function that should be called to close the database connection.
func WaitForExclusiveDatabaseLock ¶
WaitForExclusiveDatabaseLock waits for a an exclusive lock on the test database until the context is done or the exclusive access is granted. It returns a cleanup function that should be called to release the exclusive lock. In any case the lock will be automatically released when the database session ends.
Types ¶
type APIWrapper ¶
type APIWrapper struct { *itestkit.TestFullNode // contains filtered or unexported fields }
func (*APIWrapper) BurnFundsFn ¶ added in v0.12.0
func (aw *APIWrapper) BurnFundsFn(ctx context.Context, ts *types.TipSet) (lens.ShouldBurnFn, error)
func (*APIWrapper) ChainGetTipSetAfterHeight ¶
func (aw *APIWrapper) ChainGetTipSetAfterHeight(ctx context.Context, epoch abi.ChainEpoch, key types.TipSetKey) (*types.TipSet, error)
func (*APIWrapper) CirculatingSupply ¶ added in v0.9.0
func (aw *APIWrapper) CirculatingSupply(ctx context.Context, key types.TipSetKey) (api.CirculatingSupply, error)
func (*APIWrapper) ComputeBaseFee ¶ added in v0.12.0
func (aw *APIWrapper) ComputeBaseFee(ctx context.Context, ts *types.TipSet) (abi.TokenAmount, error)
func (*APIWrapper) Context ¶
func (aw *APIWrapper) Context() context.Context
func (*APIWrapper) GetMessageExecutionsForTipSet ¶
func (aw *APIWrapper) GetMessageExecutionsForTipSet(ctx context.Context, ts, pts *types.TipSet) ([]*lens.MessageExecution, error)
func (*APIWrapper) MessagesForTipSetBlocks ¶ added in v0.12.0
func (aw *APIWrapper) MessagesForTipSetBlocks(ctx context.Context, ts *types.TipSet) ([]*lens.BlockMessages, error)
func (*APIWrapper) MessagesWithDeduplicationForTipSet ¶ added in v0.17.2
func (*APIWrapper) StateGetReceipt ¶
func (aw *APIWrapper) StateGetReceipt(ctx context.Context, msg cid.Cid, from types.TipSetKey) (*types.MessageReceipt, error)
func (*APIWrapper) Store ¶
func (aw *APIWrapper) Store() adt.Store
func (*APIWrapper) TipSetMessageReceipts ¶ added in v0.12.0
func (aw *APIWrapper) TipSetMessageReceipts(ctx context.Context, ts, pts *types.TipSet) ([]*lens.BlockMessageReceipts, error)
type BlockHeaderList ¶ added in v0.10.0
type BlockHeaderList []*types.BlockHeader
func CollectBlockHeaders ¶ added in v0.10.0
CollectBlockHeaders walks the chain to collect blocks that should be indexed
func (BlockHeaderList) Cids ¶ added in v0.10.0
func (b BlockHeaderList) Cids() []string
func (BlockHeaderList) Heights ¶ added in v0.10.1
func (b BlockHeaderList) Heights() []int64
func (BlockHeaderList) Rounds ¶ added in v0.10.0
func (b BlockHeaderList) Rounds() []uint64