txexistdb

package
v3.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TxExistDB

type TxExistDB interface {

	// InitGenesis 完成创世块写入
	// @Description:
	// @param genesisBlock
	// @return error
	InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error

	// CommitBlock commits the txId and savepoint in an atomic operation
	// @Description:
	// @param blockWithRWSet
	// @param isCache
	// @return error
	CommitBlock(blockWithRWSet *serialization.BlockWithSerializedInfo, isCache bool) error

	// GetLastSavepoint returns the last block height
	// @Description:
	// @return uint64
	// @return error
	GetLastSavepoint() (uint64, error)

	// TxExists returns true if the tx exist, or returns false if none exists.
	// @Description:
	// @param txId
	// @return bool
	// @return error
	TxExists(txId string) (bool, error)
	// ImportTxID ,import txid from snapshot data to db
	ImportTxID(key, value []byte) error
	// ImportSetSavePoint, set up savePoint when import snapshot
	ImportSetSavePoint(height uint64) error
	// Close is used to close database
	// @Description:
	Close()
}

TxExistDB provides handle to block and tx instances @Description:

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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