Documentation ¶
Index ¶
- Constants
- type TransactionMgr
- func (t *TransactionMgr) AddBlacklistTxIds(txSimContext protocol.TxSimContext, params map[string][]byte) (contractResult *commonPb.ContractResult)
- func (t *TransactionMgr) DeleteBlacklistTxIds(txSimContext protocol.TxSimContext, params map[string][]byte) (contractResult *commonPb.ContractResult)
- func (t *TransactionMgr) GetBlacklistTxIds(txSimContext protocol.TxSimContext, params map[string][]byte) (contractResult *commonPb.ContractResult)
- type TransactionMgrContract
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
Click to show internal directories.
Click to hide internal directories.