txmgr

package
v0.0.0-...-fbe82ab Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrPvtdataNotAvailable

type ErrPvtdataNotAvailable struct {
	Msg string
}

当应用程序查找私有数据项时,将引发errpvdtatanovailable 在模拟过程中,模拟器无法返回 与暴露在模拟中的Snapshopt一致的私有数据项

func (*ErrPvtdataNotAvailable) Error

func (e *ErrPvtdataNotAvailable) Error() string

type ErrUnsupportedTransaction

type ErrUnsupportedTransaction struct {
	Msg string
}

如果在更新事务中执行了不受支持的查询,则应引发errUnsupportedTransaction。

func (*ErrUnsupportedTransaction) Error

func (e *ErrUnsupportedTransaction) Error() string

type TxMgr

type TxMgr interface {
	NewQueryExecutor(txid string) (ledger.QueryExecutor, error)
	NewTxSimulator(txid string) (ledger.TxSimulator, error)
	ValidateAndPrepare(blockAndPvtdata *ledger.BlockAndPvtData, doMVCCValidation bool) ([]*TxStatInfo, error)
	RemoveStaleAndCommitPvtDataOfOldBlocks(blocksPvtData map[uint64][]*ledger.TxPvtData) error
	GetLastSavepoint() (*version.Height, error)
	ShouldRecover(lastAvailableBlock uint64) (bool, uint64, error)
	CommitLostBlock(blockAndPvtdata *ledger.BlockAndPvtData) error
	Commit() error
	Rollback()
	Shutdown()
}

事务管理器应该实现的接口

type TxStatInfo

type TxStatInfo struct {
	ValidationCode peer.TxValidationCode
	TxType         common.HeaderType
	ChaincodeID    *peer.ChaincodeID
	NumCollections int
}

txstatinfo封装有关事务的信息

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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