Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockHeader ¶
type BlockHeader struct {
GUID uuid.UUID `gorm:"primaryKey;DEFAULT replace(uuid_generate_v4()::text,'-','')"`
Hash common.Hash `gorm:"serializer:bytes"`
ParentHash common.Hash `gorm:"serializer:bytes"`
Number *big.Int `gorm:"serializer:u256"`
Timestamp uint64
RLPHeader *utils.RLPHeader `gorm:"serializer:rlp;column:rlp_bytes"`
}
func (BlockHeader) TableName ¶
func (BlockHeader) TableName() string
type BlocksDB ¶
type BlocksDB interface {
BlocksView
StoreBlockHeaders([]BlockHeader) error
}
func NewBlocksDB ¶
type BlocksView ¶
type BlocksView interface {
BlockHeader(common.Hash) (*BlockHeader, error)
BlockHeaderWithFilter(BlockHeader) (*BlockHeader, error)
BlockHeaderWithScope(func(db *gorm.DB) *gorm.DB) (*BlockHeader, error)
LatestBlockHeader() (*BlockHeader, error)
}
Click to show internal directories.
Click to hide internal directories.