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
Click to show internal directories.
Click to hide internal directories.