txexistkvdb

package
v3.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxExistKvDB

type TxExistKvDB struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

TxExistKvDB provider a implementation of `txexistdb.TxExistDB` @Description: This implementation provides a key-value based data model

func NewTxExistKvDB

func NewTxExistKvDB(chainId string, dbHandle protocol.DBHandle, logger protocol.Logger) *TxExistKvDB

NewTxExistKvDB 创建一个txExistKvDB @Description: @param chainId @param dbHandle @param logger @return *TxExistKvDB

func (*TxExistKvDB) Close

func (t *TxExistKvDB) Close()

Close is used to close database @Description: @receiver t

func (*TxExistKvDB) CommitBlock

func (t *TxExistKvDB) CommitBlock(blockInfo *serialization.BlockWithSerializedInfo, isCache bool) error

CommitBlock commits the txId and savepoint in an atomic operation @Description: @receiver t @param blockInfo @param isCache @return error

func (*TxExistKvDB) GetLastSavepoint

func (t *TxExistKvDB) GetLastSavepoint() (uint64, error)

GetLastSavepoint returns the last block height @Description: @receiver t @return uint64 @return error

func (*TxExistKvDB) InitGenesis

func (t *TxExistKvDB) InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error

InitGenesis 初始化写入创世块:0号区块 @Description: @receiver t @param genesisBlock @return error

func (*TxExistKvDB) TxExists

func (t *TxExistKvDB) TxExists(txId string) (bool, error)

TxExists returns true if the tx exist, or returns false if none exists. @Description: @receiver t @param txId @return bool @return error

Jump to

Keyboard shortcuts

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