l1syncedblock

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 28, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL