Versions in this module Expand all Collapse all v1 v1.1.21 Jul 5, 2021 Changes in this version + const ExecLocalSameTime + const TxIndexFrom + const TxIndexTo + func CheckAddress(cfg *types.TuringchainConfig, addr string, height int64) error + func ExecAddress(name string) string + func HeightIndexStr(height, index int64) string + func IsDriverAddress(addr string, height int64) bool + func Register(cfg *types.TuringchainConfig, name string, create DriverCreate, height int64) + type Driver interface + Allow func(tx *types.Transaction, index int) error + CheckReceiptExecOk func() bool + CheckTx func(tx *types.Transaction, index int) error + Exec func(tx *types.Transaction, index int) (*types.Receipt, error) + ExecDelLocal func(tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error) + ExecLocal func(tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error) + ExecutorOrder func() int64 + GetActionName func(tx *types.Transaction) string + GetCoinsAccount func() *account.DB + GetCurrentExecName func() string + GetDriverName func() string + GetExecutorAPI func() api.ExecutorAPI + GetExecutorType func() types.ExecutorType + GetFuncMap func() map[string]reflect.Method + GetName func() string + GetPayloadValue func() types.Message + GetTxGroup func(index int) ([]*types.Transaction, error) + GetTxs func() []*types.Transaction + IsFree func() bool + IsFriend func(myexec []byte, writekey []byte, othertx *types.Transaction) bool + Query func(funcName string, params []byte) (types.Message, error) + SetAPI func(client.QueueProtocolAPI) + SetBlockInfo func([]byte, []byte, int64) + SetCoinsAccount func(*account.DB) + SetCurrentExecName func(string) + SetEnv func(height, blocktime int64, difficulty uint64) + SetExecutorAPI func(queueapi client.QueueProtocolAPI, turingchainapi types.TuringchainClient) + SetLocalDB func(dbm.KVDB) + SetName func(string) + SetReceipt func(receipts []*types.ReceiptData) + SetStateDB func(dbm.KV) + SetTxs func(txs []*types.Transaction) + Upgrade func() (*types.LocalDBSet, error) + func LoadDriver(name string, height int64) (driver Driver, err error) + func LoadDriverAllow(qclent client.QueueProtocolAPI, tx *types.Transaction, index int, height int64) (driver Driver) + func LoadDriverWithClient(qclent client.QueueProtocolAPI, name string, height int64) (driver Driver, err error) + type DriverBase struct + func (d *DriverBase) AddRollbackKV(tx *types.Transaction, execer []byte, kvs []*types.KeyValue) []*types.KeyValue + func (d *DriverBase) Allow(tx *types.Transaction, index int) error + func (d *DriverBase) AllowIsSame(execer []byte) bool + func (d *DriverBase) AllowIsUserDot1(execer []byte) bool + func (d *DriverBase) AllowIsUserDot2(execer []byte) bool + func (d *DriverBase) CheckReceiptExecOk() bool + func (d *DriverBase) CheckSignatureData(tx *types.Transaction, index int) bool + func (d *DriverBase) CheckTx(tx *types.Transaction, index int) error + func (d *DriverBase) DelRollbackKV(tx *types.Transaction, execer []byte) ([]*types.KeyValue, error) + func (d *DriverBase) Exec(tx *types.Transaction, index int) (receipt *types.Receipt, err error) + func (d *DriverBase) ExecDelLocal(tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error) + func (d *DriverBase) ExecLocal(tx *types.Transaction, receipt *types.ReceiptData, index int) (*types.LocalDBSet, error) + func (d *DriverBase) ExecutorOrder() int64 + func (d *DriverBase) GetAPI() client.QueueProtocolAPI + func (d *DriverBase) GetActionName(tx *types.Transaction) string + func (d *DriverBase) GetAddrTxsCount(reqkey *types.ReqKey) (types.Message, error) + func (d *DriverBase) GetBlockTime() int64 + func (d *DriverBase) GetCoinsAccount() *account.DB + func (d *DriverBase) GetCurrentExecName() string + func (d *DriverBase) GetDifficulty() uint64 + func (d *DriverBase) GetExecutorAPI() api.ExecutorAPI + func (d *DriverBase) GetExecutorType() types.ExecutorType + func (d *DriverBase) GetFuncMap() map[string]reflect.Method + func (d *DriverBase) GetHeight() int64 + func (d *DriverBase) GetLastHash() []byte + func (d *DriverBase) GetLocalDB() dbm.KVDB + func (d *DriverBase) GetMainHeight() int64 + func (d *DriverBase) GetName() string + func (d *DriverBase) GetParentHash() []byte + func (d *DriverBase) GetPayloadValue() types.Message + func (d *DriverBase) GetPrefixCount(key *types.ReqKey) (types.Message, error) + func (d *DriverBase) GetReceipt() []*types.ReceiptData + func (d *DriverBase) GetStateDB() dbm.KV + func (d *DriverBase) GetTxGroup(index int) ([]*types.Transaction, error) + func (d *DriverBase) GetTxs() []*types.Transaction + func (d *DriverBase) GetTxsByAddr(addr *types.ReqAddr) (types.Message, error) + func (d *DriverBase) IsFree() bool + func (d *DriverBase) IsFriend(myexec, writekey []byte, othertx *types.Transaction) bool + func (d *DriverBase) Query(funcname string, params []byte) (msg types.Message, err error) + func (d *DriverBase) SetAPI(queueapi client.QueueProtocolAPI) + func (d *DriverBase) SetBlockInfo(parentHash, mainHash []byte, mainHeight int64) + func (d *DriverBase) SetChild(e Driver) + func (d *DriverBase) SetCoinsAccount(acc *account.DB) + func (d *DriverBase) SetCurrentExecName(name string) + func (d *DriverBase) SetEnv(height, blocktime int64, difficulty uint64) + func (d *DriverBase) SetExecutorAPI(queueapi client.QueueProtocolAPI, turingchainapi types.TuringchainClient) + func (d *DriverBase) SetExecutorType(e types.ExecutorType) + func (d *DriverBase) SetIsFree(isFree bool) + func (d *DriverBase) SetLocalDB(db dbm.KVDB) + func (d *DriverBase) SetName(name string) + func (d *DriverBase) SetReceipt(receipts []*types.ReceiptData) + func (d *DriverBase) SetStateDB(db dbm.KV) + func (d *DriverBase) SetTxs(txs []*types.Transaction) + func (d *DriverBase) Upgrade() (*types.LocalDBSet, error) + type DriverCreate func() Driver + type KVCreator struct + func NewKVCreator(kv db.KV, prefix []byte, rollbackkey []byte) *KVCreator + func (c *KVCreator) Add(key, value []byte) *KVCreator + func (c *KVCreator) AddKVListOnly(list []*types.KeyValue) *KVCreator + func (c *KVCreator) AddKVOnly(key, value []byte) *KVCreator + func (c *KVCreator) AddList(list []*types.KeyValue) *KVCreator + func (c *KVCreator) AddListNoPrefix(list []*types.KeyValue) *KVCreator + func (c *KVCreator) AddNoPrefix(key, value []byte) *KVCreator + func (c *KVCreator) AddRollbackKV() + func (c *KVCreator) AddToLogs(logs []*types.ReceiptLog) []*types.ReceiptLog + func (c *KVCreator) DelRollbackKV() + func (c *KVCreator) Get(key []byte) ([]byte, error) + func (c *KVCreator) GetNoPrefix(key []byte) ([]byte, error) + func (c *KVCreator) GetRollbackKVList() ([]*types.KeyValue, error) + func (c *KVCreator) KVList() []*types.KeyValue