txdb

package
v1.2.20 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2025 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Txns    = "txns"
	Results = "results"
)

Variables

This section is empty.

Functions

func NewTxDB

func NewTxDB(nodeTyp int, kvdb kv.Kvdb, kvdbConf *config.KVconf) (ItxDB, error)

Types

type TxDB

type TxDB struct {
	// contains filtered or unexported fields
}

func (*TxDB) ExistTxn

func (bb *TxDB) ExistTxn(txnHash Hash) bool

func (*TxDB) GetReceipt

func (bb *TxDB) GetReceipt(txHash Hash) (rec *Receipt, err error)

func (*TxDB) GetTxn

func (bb *TxDB) GetTxn(txnHash Hash) (stxn *SignedTxn, err error)

func (*TxDB) GetTxns

func (bb *TxDB) GetTxns(txnHashes []Hash) (stxns []*SignedTxn, err error)

func (*TxDB) SetReceipt

func (bb *TxDB) SetReceipt(txHash Hash, receipt *Receipt) (err error)

func (*TxDB) SetReceipts

func (bb *TxDB) SetReceipts(receipts map[Hash]*Receipt) (err error)

func (*TxDB) SetTxns

func (bb *TxDB) SetTxns(txns []*SignedTxn) (err error)

type TxnDBSchema added in v1.2.20

type TxnDBSchema struct {
	Type  string `gorm:"type:varchar(10)"`
	Key   string `gorm:"primaryKey;type:text"`
	Value string `gorm:"type:text"`
}

func (TxnDBSchema) TableName added in v1.2.20

func (TxnDBSchema) TableName() string

Jump to

Keyboard shortcuts

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