txexistkvdb

package
v0.0.0-...-8b03266 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 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` This implementation provides a key-value based data model

func NewTxExistKvDB

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

创建一个txExistKvDB

func (*TxExistKvDB) Close

func (t *TxExistKvDB) Close()

Close is used to close database

func (*TxExistKvDB) CommitBlock

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

CommitBlock commits the txId and savepoint in an atomic operation

func (*TxExistKvDB) GetLastSavepoint

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

GetLastSavepoint returns the last block height

func (*TxExistKvDB) InitGenesis

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

初始化写入创世块:0号区块

func (*TxExistKvDB) TxExists

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

TxExists returns true if the tx exist, or returns false if none exists.

Jump to

Keyboard shortcuts

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