priorityrequest

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 = "priority_request"

	PendingStatus = 1
	HandledStatus = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type PriorityRequest

type PriorityRequest struct {
	gorm.Model
	// related txVerification hash
	L1TxHash string
	// related block height
	L1BlockHeight int64
	// sender
	SenderAddress string
	// request id
	RequestId int64
	// tx type
	TxType int64
	// pub data
	Pubdata string
	// expirationBlock
	ExpirationBlock int64
	// status
	Status int
	// L2TxHash for the relation to tx table
	L2TxHash string `gorm:"index"`
}

func (*PriorityRequest) TableName

func (*PriorityRequest) TableName() string

type PriorityRequestModel

type PriorityRequestModel interface {
	CreatePriorityRequestTable() error
	DropPriorityRequestTable() error
	GetPriorityRequestsByStatus(status int) (txs []*PriorityRequest, err error)
	GetLatestHandledRequestId() (requestId int64, err error)
	UpdateHandledPriorityRequestsInTransact(tx *gorm.DB, requests []*PriorityRequest) (err error)
	CreatePriorityRequestsInTransact(tx *gorm.DB, requests []*PriorityRequest) (err error)
	GetPriorityRequestsByL2TxHash(txHash string) (tx *PriorityRequest, err error)
}

func NewPriorityRequestModel

func NewPriorityRequestModel(db *gorm.DB) PriorityRequestModel

Jump to

Keyboard shortcuts

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