Documentation
¶
Index ¶
- func InitChainCursor(ctx context.Context, entCl *ent.Client, chain netconf.Chain) (uint64, uint64, error)
- func InsertBlockTX(ctx context.Context, tx *ent.Tx, block xchain.Block) error
- func Run(ctx context.Context, cfg Config) error
- func WriteConfigTOML(cfg Config, logCfg log.Config, path string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitChainCursor ¶ added in v0.1.4
func InitChainCursor(ctx context.Context, entCl *ent.Client, chain netconf.Chain) (uint64, uint64, error)
InitChainCursor return the initial cursor height to start streaming from (inclusive). If a cursor exists, it returns the cursor height + 1. Else a new cursor is created with chain deploy height.
func InsertBlockTX ¶ added in v0.1.3
InsertBlockTX inserts the block as part of a tx and commits it. The caller should handle rollback on any error.
Types ¶
Click to show internal directories.
Click to hide internal directories.