Documentation ¶
Index ¶
Constants ¶
View Source
const ( TableName = "l1_synced_block" TypeGeneric int = 0 TypeGovernance int = 1 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type L1SyncedBlock ¶
type L1SyncedBlock struct { gorm.Model // l1 block height L1BlockHeight int64 `gorm:"index"` // block info, array of hashes BlockInfo string Type int `gorm:"index"` }
func (*L1SyncedBlock) TableName ¶
func (*L1SyncedBlock) TableName() string
type L1SyncedBlockModel ¶
type L1SyncedBlockModel interface { CreateL1SyncedBlockTable() error DropL1SyncedBlockTable() error GetLatestL1SyncedBlockByType(blockType int) (blockInfo *L1SyncedBlock, err error) DeleteL1SyncedBlocksForHeightLessThan(height int64) (err error) CreateL1SyncedBlockInTransact(tx *gorm.DB, block *L1SyncedBlock) error }
func NewL1SyncedBlockModel ¶
func NewL1SyncedBlockModel(db *gorm.DB) L1SyncedBlockModel
Click to show internal directories.
Click to hide internal directories.