resultdb

package
v2.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

README

结果(收据)数据库

保存了合约执行的结果集,包括:

  • 结果状态
  • 读写集
  • 事件日志

结果对象

主键为txId

事件日志

SQL DB

数据库名: chainId+"_resultdb"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResultDB

type ResultDB interface {
	InitGenesis(genesisBlock *serialization.BlockWithSerializedInfo) error

	// CommitBlock commits the block rwsets in an atomic operation
	CommitBlock(blockInfo *serialization.BlockWithSerializedInfo, isCache bool) error

	// ShrinkBlocks archive old blocks rwsets in an atomic operation
	ShrinkBlocks(txIdsMap map[uint64][]string) error

	// RestoreBlocks restore blocks from outside serialized block data
	RestoreBlocks(blockInfos []*serialization.BlockWithSerializedInfo) error

	// GetTxRWSet returns an txRWSet for given txId, or returns nil if none exists.
	GetTxRWSet(txid string) (*commonPb.TxRWSet, error)

	// GetLastSavepoint returns the last block height
	GetLastSavepoint() (uint64, error)

	// Close is used to close database
	Close()
}

ResultDB provides handle to rwSets instances

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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