transactionmgr

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Separator for kv iterator split
	Separator = "@"
	// KeyPrefix blacklist tx ids key prefix
	KeyPrefix = "blacklistTxIds" + Separator
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TransactionMgr

type TransactionMgr struct {
	// contains filtered or unexported fields
}

TransactionMgr transaction blacklist management

func (*TransactionMgr) AddBlacklistTxIds

func (t *TransactionMgr) AddBlacklistTxIds(txSimContext protocol.TxSimContext,
	params map[string][]byte) (contractResult *commonPb.ContractResult)

AddBlacklistTxIds add txIds to blacklist @param txIds 交易id,通过逗号分隔,如: "txId1,txId2,txId3..." @return "ok"

func (*TransactionMgr) DeleteBlacklistTxIds

func (t *TransactionMgr) DeleteBlacklistTxIds(txSimContext protocol.TxSimContext,
	params map[string][]byte) (contractResult *commonPb.ContractResult)

DeleteBlacklistTxIds delete txIds to blacklist @param txIds 交易id,通过逗号分隔,如: "txId1,txId2,txId3..." @return "ok"

func (*TransactionMgr) GetBlacklistTxIds

func (t *TransactionMgr) GetBlacklistTxIds(txSimContext protocol.TxSimContext,
	params map[string][]byte) (contractResult *commonPb.ContractResult)

GetBlacklistTxIds 查询交易是否存在黑名单中 @param txIds 交易id @return "1" :存在黑名单中,其他表示不存在

type TransactionMgrContract

type TransactionMgrContract struct {
	// contains filtered or unexported fields
}

TransactionMgrContract 交易管理合约

func NewTransactionMgrContract

func NewTransactionMgrContract(log protocol.Logger) *TransactionMgrContract

NewTransactionMgrContract TransactionMgrContract构造函数 @param log @return *TransactionMgrContract

func (*TransactionMgrContract) GetMethod

func (c *TransactionMgrContract) GetMethod(methodName string, _blockVersion uint32) common.ContractFunc

GetMethod get register method by name

Jump to

Keyboard shortcuts

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