Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHeader ¶
type BlockHeader struct { Height int64 `pg:",pk,use_zero,notnull"` Cid string `pg:",pk,notnull"` Miner string `pg:",notnull"` ParentWeight string `pg:",notnull"` ParentBaseFee string `pg:",notnull"` ParentStateRoot string `pg:",notnull"` WinCount int64 `pg:",use_zero"` Timestamp uint64 `pg:",use_zero"` ForkSignaling uint64 `pg:",use_zero"` }
func NewBlockHeader ¶
func NewBlockHeader(bh *types.BlockHeader) *BlockHeader
func (*BlockHeader) Persist ¶
func (bh *BlockHeader) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error
type BlockHeaders ¶
type BlockHeaders []*BlockHeader
func (BlockHeaders) Persist ¶
func (bhl BlockHeaders) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error
type BlockParent ¶
type BlockParent struct { Height int64 `pg:",pk,notnull,use_zero"` Block string `pg:",pk,notnull"` Parent string `pg:",pk,notnull"` }
func (*BlockParent) Persist ¶
func (bp *BlockParent) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error
type BlockParents ¶
type BlockParents []*BlockParent
func NewBlockParents ¶
func NewBlockParents(header *types.BlockHeader) BlockParents
func (BlockParents) Persist ¶
func (bps BlockParents) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error
type DrandBlockEntrie ¶
type DrandBlockEntrie struct { // Round is the round number of randomness used. Round uint64 `pg:",pk,use_zero"` // Block is the CID of the block. Block string `pg:",pk,notnull"` }
DrandBlockEntrie contains Drand randomness round numbers used in each block.
func (*DrandBlockEntrie) Persist ¶
func (dbe *DrandBlockEntrie) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error
type DrandBlockEntries ¶
type DrandBlockEntries []*DrandBlockEntrie
func NewDrandBlockEntries ¶
func NewDrandBlockEntries(header *types.BlockHeader) DrandBlockEntries
func (DrandBlockEntries) Persist ¶
func (dbes DrandBlockEntries) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error
type UnsyncedBlockHeader ¶ added in v0.17.2
type UnsyncedBlockHeader struct { Height int64 `pg:",pk,use_zero,notnull"` Cid string `pg:",pk,notnull"` Miner string `pg:",notnull"` ParentWeight string `pg:",notnull"` ParentBaseFee string `pg:",notnull"` ParentStateRoot string `pg:",notnull"` WinCount int64 `pg:",use_zero"` Timestamp uint64 `pg:",use_zero"` ForkSignaling uint64 `pg:",use_zero"` IsOrphan bool `pg:",notnull"` }
func NewUnsyncedBlockHeader ¶ added in v0.17.2
func NewUnsyncedBlockHeader(bh *types.BlockHeader) *UnsyncedBlockHeader
func (*UnsyncedBlockHeader) Persist ¶ added in v0.17.2
func (bh *UnsyncedBlockHeader) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error
type UnsyncedBlockHeaders ¶ added in v0.17.2
type UnsyncedBlockHeaders []*UnsyncedBlockHeader
func (UnsyncedBlockHeaders) Persist ¶ added in v0.17.2
func (bhl UnsyncedBlockHeaders) Persist(ctx context.Context, s model.StorageBatch, _ model.Version) error
Click to show internal directories.
Click to hide internal directories.