Documentation
¶
Index ¶
- Variables
- func InitBlockFetch(ctx context.Context) (<-chan chain.Block, jobs.NamedFunction)
- func InitGlobalSync(ctx context.Context)
- func SetFirstBlock(height int64, timestamp db.Nano, hash string)
- type Iterator
- type Sync
- func (s *Sync) BlockStoreHeight() int64
- func (s *Sync) CatchUp(out chan<- chain.Block, startHeight int64) (height int64, inSync bool, err error)
- func (s *Sync) CheckGenesisStatus()
- func (s *Sync) FetchSingle(height int64) (*coretypes.ResultBlockResults, error)
- func (s *Sync) KeepInSync(ctx context.Context, out chan chain.Block)
Constants ¶
This section is empty.
Variables ¶
View Source
var CheckBlockStoreBlocks = false
View Source
var CursorHeight = metrics.Must1LabelInteger("midgard_chain_cursor_height", "node")
CursorHeight is the Tendermint chain position [sequence identifier].
View Source
var NodeHeight = metrics.Must1LabelRealSample("midgard_chain_height", "node")
NodeHeight is the latest Tendermint chain position [sequence identifier] reported by the node.
Functions ¶
func InitBlockFetch ¶
func InitGlobalSync ¶
Types ¶
type Iterator ¶
type Iterator struct {
// contains filtered or unexported fields
}
func NewIterator ¶
func (*Iterator) FetchingFrom ¶
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
var GlobalSync *Sync
func (*Sync) BlockStoreHeight ¶
func (*Sync) CatchUp ¶
func (s *Sync) CatchUp(out chan<- chain.Block, startHeight int64) ( height int64, inSync bool, err error)
CatchUp reads the latest block height from Status then it fetches all blocks from offset to that height. The error return is never nil. See ErrQuit and ErrNoData for normal exit.
func (*Sync) CheckGenesisStatus ¶
func (s *Sync) CheckGenesisStatus()
func (*Sync) FetchSingle ¶
func (s *Sync) FetchSingle(height int64) (*coretypes.ResultBlockResults, error)
Directories
¶
Path | Synopsis |
---|---|
Package chain provides a blockchain client.
|
Package chain provides a blockchain client. |
Click to show internal directories.
Click to hide internal directories.