Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultDbFilename = "msgindex.db"
Variables ¶
View Source
var ( CoalesceMinDelay = time.Second CoalesceMaxDelay = 15 * time.Second CoalesceMergeInterval = time.Second )
coalescer configuration (TODO: use observer instead) these are exposed to make tests snappy
View Source
var ErrClosed = errors.New("index closed")
View Source
var ErrNotFound = errors.New("message not found")
Functions ¶
func PopulateAfterSnapshot ¶
func PopulateAfterSnapshot(lctx context.Context, path string, cs ChainStore) error
Types ¶
type ChainStore ¶
type ChainStore interface { SubscribeHeadChanges(f store.ReorgNotifee) MessagesForTipset(ctx context.Context, ts *types.TipSet) ([]types.ChainMsg, error) GetHeaviestTipSet() *types.TipSet GetTipSetFromKey(ctx context.Context, tsk types.TipSetKey) (*types.TipSet, error) }
ChainStore interface; we could use store.ChainStore directly, but this simplifies unit testing.
type MsgIndex ¶
type MsgIndex interface { // GetMsgInfo retrieves the message metadata through the index. // The lookup is done using the onchain message Cid; that is the signed message Cid // for SECP messages and unsigned message Cid for BLS messages. GetMsgInfo(ctx context.Context, m cid.Cid) (MsgInfo, error) // Close closes the index Close() error }
MsgIndex is the interface to the message index
var DummyMsgIndex MsgIndex = dummyMsgIndex{}
func NewMsgIndex ¶
type MsgInfo ¶
type MsgInfo struct { // the message this record refers to Message cid.Cid // the tipset where this message was included TipSet cid.Cid // the epoch where this message was included Epoch abi.ChainEpoch }
MsgInfo is the Message metadata the index tracks.
Click to show internal directories.
Click to hide internal directories.