Documentation ¶
Overview ¶
- @author PalletOne core developers <dev@pallet.one>
- @date 2018-2020
Package rwset is a generated GoMock package.
- @author PalletOne core developers <dev@pallet.one>
- @date 2018-2020
Index ¶
- Variables
- type IDataQuery
- type IStateQuery
- type KVRWSet
- type KVRead
- type KVWrite
- type MockIDataQuery
- func (m *MockIDataQuery) EXPECT() *MockIDataQueryMockRecorder
- func (m *MockIDataQuery) GetAddr1TokenUtxos(addr common.Address, asset *modules.Asset) (map[modules.OutPoint]*modules.Utxo, error)
- func (m *MockIDataQuery) GetAddrUtxos(addr common.Address) (map[modules.OutPoint]*modules.Utxo, error)
- func (m *MockIDataQuery) GetContractState(contractid []byte, field string) ([]byte, *modules.StateVersion, error)
- func (m *MockIDataQuery) GetContractStatesById(contractid []byte) (map[string]*modules.ContractStateValue, error)
- func (m *MockIDataQuery) GetContractStatesByPrefix(contractid []byte, prefix string) (map[string]*modules.ContractStateValue, error)
- func (m *MockIDataQuery) GetGlobalProp() *modules.GlobalProperty
- func (m *MockIDataQuery) GetHeaderByNumber(number *modules.ChainIndex) (*modules.Header, error)
- func (m *MockIDataQuery) GetNewestUnit(token modules.AssetId) (common.Hash, *modules.ChainIndex, error)
- func (m *MockIDataQuery) GetStableTransactionOnly(hash common.Hash) (*modules.Transaction, error)
- func (m *MockIDataQuery) GetStableUnit(hash common.Hash) (*modules.Unit, error)
- func (m *MockIDataQuery) GetStableUnitByNumber(number *modules.ChainIndex) (*modules.Unit, error)
- func (m *MockIDataQuery) UnstableHeadUnitProperty(asset modules.AssetId) (*modules.UnitProperty, error)
- type MockIDataQueryMockRecorder
- func (mr *MockIDataQueryMockRecorder) GetAddr1TokenUtxos(addr, asset interface{}) *gomock.Call
- func (mr *MockIDataQueryMockRecorder) GetAddrUtxos(addr interface{}) *gomock.Call
- func (mr *MockIDataQueryMockRecorder) GetContractState(contractid, field interface{}) *gomock.Call
- func (mr *MockIDataQueryMockRecorder) GetContractStatesById(contractid interface{}) *gomock.Call
- func (mr *MockIDataQueryMockRecorder) GetContractStatesByPrefix(contractid, prefix interface{}) *gomock.Call
- func (mr *MockIDataQueryMockRecorder) GetGlobalProp() *gomock.Call
- func (mr *MockIDataQueryMockRecorder) GetHeaderByNumber(number interface{}) *gomock.Call
- func (mr *MockIDataQueryMockRecorder) GetNewestUnit(token interface{}) *gomock.Call
- func (mr *MockIDataQueryMockRecorder) GetStableTransactionOnly(hash interface{}) *gomock.Call
- func (mr *MockIDataQueryMockRecorder) GetStableUnit(hash interface{}) *gomock.Call
- func (mr *MockIDataQueryMockRecorder) GetStableUnitByNumber(number interface{}) *gomock.Call
- func (mr *MockIDataQueryMockRecorder) UnstableHeadUnitProperty(asset interface{}) *gomock.Call
- type MockIStateQuery
- func (m *MockIStateQuery) EXPECT() *MockIStateQueryMockRecorder
- func (m *MockIStateQuery) GetContractState(contractid []byte, field string) ([]byte, *modules.StateVersion, error)
- func (m *MockIStateQuery) GetContractStatesById(contractid []byte) (map[string]*modules.ContractStateValue, error)
- func (m *MockIStateQuery) GetContractStatesByPrefix(contractid []byte, prefix string) (map[string]*modules.ContractStateValue, error)
- type MockIStateQueryMockRecorder
- func (mr *MockIStateQueryMockRecorder) GetContractState(contractid, field interface{}) *gomock.Call
- func (mr *MockIStateQueryMockRecorder) GetContractStatesById(contractid interface{}) *gomock.Call
- func (mr *MockIStateQueryMockRecorder) GetContractStatesByPrefix(contractid, prefix interface{}) *gomock.Call
- type RWSetBuilder
- func (b *RWSetBuilder) AddSupplyToken(ns string, assetId, uniqueId []byte, amt uint64, createAddr common.Address) error
- func (b *RWSetBuilder) AddToReadSet(contractId []byte, ns string, key string, version *modules.StateVersion)
- func (b *RWSetBuilder) AddToWriteSet(contractId []byte, ns string, key string, value []byte)
- func (b *RWSetBuilder) AddTokenPayOut(ns string, address common.Address, asset *modules.Asset, amount uint64, ...)
- func (b *RWSetBuilder) DefineToken(ns string, tokenType int32, define []byte, createAddr common.Address)
- func (b *RWSetBuilder) GetTokenDefine(ns string) *modules.TokenDefine
- func (b *RWSetBuilder) GetTokenPayOut(ns string) []*modules.TokenPayOut
- func (b *RWSetBuilder) GetTokenSupply(ns string) []*modules.TokenSupply
- func (b *RWSetBuilder) GetWriteSet(contractId []byte, key string) ([]byte, error)
- func (b *RWSetBuilder) GetWriteSets(contractId []byte) ([]*KVWrite, error)
- type RwSetTxMgr
- type RwSetTxSimulator
- func (s *RwSetTxSimulator) CheckDone() error
- func (s *RwSetTxSimulator) Close()
- func (s *RwSetTxSimulator) DefineToken(ns string, tokenType int32, define []byte, creator string) error
- func (s *RwSetTxSimulator) DeleteState(contractId []byte, ns string, key string) error
- func (h *RwSetTxSimulator) Done()
- func (s *RwSetTxSimulator) GetAllStates(contractid []byte, ns string) (map[string]*modules.ContractStateValue, error)
- func (s *RwSetTxSimulator) GetContractState(contractid []byte, field string) ([]byte, *modules.StateVersion, error)
- func (s *RwSetTxSimulator) GetContractStatesById(contractid []byte) (map[string]*modules.ContractStateValue, error)
- func (s *RwSetTxSimulator) GetContractStatesByPrefix(contractid []byte, prefix string) (map[string]*modules.ContractStateValue, error)
- func (s *RwSetTxSimulator) GetGlobalProp() ([]byte, error)
- func (s *RwSetTxSimulator) GetPayOutData(ns string) ([]*modules.TokenPayOut, error)
- func (s *RwSetTxSimulator) GetRwData(ns string) ([]*KVRead, []*KVWrite, error)
- func (s *RwSetTxSimulator) GetStableTransactionByHash(ns string, hash common.Hash) (*modules.Transaction, error)
- func (s *RwSetTxSimulator) GetStableUnit(ns string, hash common.Hash, unitNumber uint64) (*modules.Unit, error)
- func (s *RwSetTxSimulator) GetState(contractid []byte, ns string, key string) ([]byte, error)
- func (s *RwSetTxSimulator) GetStatesByPrefix(contractid []byte, ns string, prefix string) ([]*modules.KeyValue, error)
- func (s *RwSetTxSimulator) GetTimestamp(ns string, rangeNumber uint32) ([]byte, error)
- func (s *RwSetTxSimulator) GetTokenBalance(ns string, addr common.Address, asset *modules.Asset) (map[modules.Asset]uint64, error)
- func (s *RwSetTxSimulator) GetTokenDefineData(ns string) (*modules.TokenDefine, error)
- func (s *RwSetTxSimulator) GetTokenSupplyData(ns string) ([]*modules.TokenSupply, error)
- func (s *RwSetTxSimulator) PayOutToken(ns string, address string, token *modules.Asset, amount uint64, ...) error
- func (s *RwSetTxSimulator) Rollback() error
- func (s *RwSetTxSimulator) SetState(contractId []byte, ns string, key string, value []byte) error
- func (s *RwSetTxSimulator) String() string
- func (s *RwSetTxSimulator) SupplyToken(ns string, assetId, uniqueId []byte, amt uint64, creator string) error
- type TxManager
- type TxSimulator
Constants ¶
This section is empty.
Variables ¶
var ChainId = "palletone"
Functions ¶
This section is empty.
Types ¶
type IDataQuery ¶ added in v1.0.6
type IDataQuery interface { IStateQuery UnstableHeadUnitProperty(asset modules.AssetId) (*modules.UnitProperty, error) GetGlobalProp() *modules.GlobalProperty GetNewestUnit(token modules.AssetId) (common.Hash, *modules.ChainIndex, error) GetHeaderByNumber(number *modules.ChainIndex) (*modules.Header, error) GetAddrUtxos(addr common.Address) (map[modules.OutPoint]*modules.Utxo, error) GetAddr1TokenUtxos(addr common.Address, asset *modules.Asset) (map[modules.OutPoint]*modules.Utxo, error) GetStableTransactionOnly(hash common.Hash) (*modules.Transaction, error) GetStableUnit(hash common.Hash) (*modules.Unit, error) GetStableUnitByNumber(number *modules.ChainIndex) (*modules.Unit, error) }
type IStateQuery ¶ added in v1.0.6
type IStateQuery interface { GetContractStatesById(contractid []byte) (map[string]*modules.ContractStateValue, error) GetContractState(contractid []byte, field string) ([]byte, *modules.StateVersion, error) GetContractStatesByPrefix(contractid []byte, prefix string) (map[string]*modules.ContractStateValue, error) }
type KVRWSet ¶
type KVRWSet struct { Reads map[string]*KVRead `protobuf:"bytes,1,rep,name=reads" json:"reads,omitempty"` Writes map[string]*KVWrite `protobuf:"bytes,3,rep,name=writes" json:"writes,omitempty"` }
func (*KVRWSet) Descriptor ¶
func (*KVRWSet) MarshalText ¶ added in v1.0.6
func (*KVRWSet) ProtoMessage ¶
func (*KVRWSet) ProtoMessage()
type KVRead ¶
type KVRead struct { ContractId []byte `protobuf:"bytes,4,opt,name=contract_id,proto3" json:"contract_id,omitempty"` // contains filtered or unexported fields }
func NewKVRead ¶
func NewKVRead(contractId []byte, key string, version *modules.StateVersion) *KVRead
NewKVRead helps constructing proto message kvrwset.KVRead
func (*KVRead) Descriptor ¶
func (*KVRead) GetVersion ¶
func (m *KVRead) GetVersion() *modules.StateVersion
func (*KVRead) MarshalText ¶ added in v1.0.6
func (*KVRead) ProtoMessage ¶
func (*KVRead) ProtoMessage()
type KVWrite ¶
type KVWrite struct { ContractId []byte `protobuf:"bytes,4,opt,name=contract_id,proto3" json:"contract_id,omitempty"` // contains filtered or unexported fields }
KVWrite captures a write (update/delete) operation performed during transaction simulation
func (*KVWrite) Descriptor ¶
func (*KVWrite) GetIsDelete ¶
func (*KVWrite) ProtoMessage ¶
func (*KVWrite) ProtoMessage()
type MockIDataQuery ¶ added in v1.0.6
type MockIDataQuery struct {
// contains filtered or unexported fields
}
MockIDataQuery is a mock of IDataQuery interface
func NewMockIDataQuery ¶ added in v1.0.6
func NewMockIDataQuery(ctrl *gomock.Controller) *MockIDataQuery
NewMockIDataQuery creates a new mock instance
func (*MockIDataQuery) EXPECT ¶ added in v1.0.6
func (m *MockIDataQuery) EXPECT() *MockIDataQueryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockIDataQuery) GetAddr1TokenUtxos ¶ added in v1.0.6
func (m *MockIDataQuery) GetAddr1TokenUtxos(addr common.Address, asset *modules.Asset) (map[modules.OutPoint]*modules.Utxo, error)
GetAddr1TokenUtxos mocks base method
func (*MockIDataQuery) GetAddrUtxos ¶ added in v1.0.6
func (m *MockIDataQuery) GetAddrUtxos(addr common.Address) (map[modules.OutPoint]*modules.Utxo, error)
GetAddrUtxos mocks base method
func (*MockIDataQuery) GetContractState ¶ added in v1.0.6
func (m *MockIDataQuery) GetContractState(contractid []byte, field string) ([]byte, *modules.StateVersion, error)
GetContractState mocks base method
func (*MockIDataQuery) GetContractStatesById ¶ added in v1.0.6
func (m *MockIDataQuery) GetContractStatesById(contractid []byte) (map[string]*modules.ContractStateValue, error)
GetContractStatesById mocks base method
func (*MockIDataQuery) GetContractStatesByPrefix ¶ added in v1.0.6
func (m *MockIDataQuery) GetContractStatesByPrefix(contractid []byte, prefix string) (map[string]*modules.ContractStateValue, error)
GetContractStatesByPrefix mocks base method
func (*MockIDataQuery) GetGlobalProp ¶ added in v1.0.6
func (m *MockIDataQuery) GetGlobalProp() *modules.GlobalProperty
GetGlobalProp mocks base method
func (*MockIDataQuery) GetHeaderByNumber ¶ added in v1.0.6
func (m *MockIDataQuery) GetHeaderByNumber(number *modules.ChainIndex) (*modules.Header, error)
GetHeaderByNumber mocks base method
func (*MockIDataQuery) GetNewestUnit ¶ added in v1.0.6
func (m *MockIDataQuery) GetNewestUnit(token modules.AssetId) (common.Hash, *modules.ChainIndex, error)
GetNewestUnit mocks base method
func (*MockIDataQuery) GetStableTransactionOnly ¶ added in v1.0.6
func (m *MockIDataQuery) GetStableTransactionOnly(hash common.Hash) (*modules.Transaction, error)
GetStableTransactionOnly mocks base method
func (*MockIDataQuery) GetStableUnit ¶ added in v1.0.6
GetStableUnit mocks base method
func (*MockIDataQuery) GetStableUnitByNumber ¶ added in v1.0.6
func (m *MockIDataQuery) GetStableUnitByNumber(number *modules.ChainIndex) (*modules.Unit, error)
GetStableUnitByNumber mocks base method
func (*MockIDataQuery) UnstableHeadUnitProperty ¶ added in v1.0.6
func (m *MockIDataQuery) UnstableHeadUnitProperty(asset modules.AssetId) (*modules.UnitProperty, error)
UnstableHeadUnitProperty mocks base method
type MockIDataQueryMockRecorder ¶ added in v1.0.6
type MockIDataQueryMockRecorder struct {
// contains filtered or unexported fields
}
MockIDataQueryMockRecorder is the mock recorder for MockIDataQuery
func (*MockIDataQueryMockRecorder) GetAddr1TokenUtxos ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetAddr1TokenUtxos(addr, asset interface{}) *gomock.Call
GetAddr1TokenUtxos indicates an expected call of GetAddr1TokenUtxos
func (*MockIDataQueryMockRecorder) GetAddrUtxos ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetAddrUtxos(addr interface{}) *gomock.Call
GetAddrUtxos indicates an expected call of GetAddrUtxos
func (*MockIDataQueryMockRecorder) GetContractState ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetContractState(contractid, field interface{}) *gomock.Call
GetContractState indicates an expected call of GetContractState
func (*MockIDataQueryMockRecorder) GetContractStatesById ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetContractStatesById(contractid interface{}) *gomock.Call
GetContractStatesById indicates an expected call of GetContractStatesById
func (*MockIDataQueryMockRecorder) GetContractStatesByPrefix ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetContractStatesByPrefix(contractid, prefix interface{}) *gomock.Call
GetContractStatesByPrefix indicates an expected call of GetContractStatesByPrefix
func (*MockIDataQueryMockRecorder) GetGlobalProp ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetGlobalProp() *gomock.Call
GetGlobalProp indicates an expected call of GetGlobalProp
func (*MockIDataQueryMockRecorder) GetHeaderByNumber ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetHeaderByNumber(number interface{}) *gomock.Call
GetHeaderByNumber indicates an expected call of GetHeaderByNumber
func (*MockIDataQueryMockRecorder) GetNewestUnit ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetNewestUnit(token interface{}) *gomock.Call
GetNewestUnit indicates an expected call of GetNewestUnit
func (*MockIDataQueryMockRecorder) GetStableTransactionOnly ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetStableTransactionOnly(hash interface{}) *gomock.Call
GetStableTransactionOnly indicates an expected call of GetStableTransactionOnly
func (*MockIDataQueryMockRecorder) GetStableUnit ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetStableUnit(hash interface{}) *gomock.Call
GetStableUnit indicates an expected call of GetStableUnit
func (*MockIDataQueryMockRecorder) GetStableUnitByNumber ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) GetStableUnitByNumber(number interface{}) *gomock.Call
GetStableUnitByNumber indicates an expected call of GetStableUnitByNumber
func (*MockIDataQueryMockRecorder) UnstableHeadUnitProperty ¶ added in v1.0.6
func (mr *MockIDataQueryMockRecorder) UnstableHeadUnitProperty(asset interface{}) *gomock.Call
UnstableHeadUnitProperty indicates an expected call of UnstableHeadUnitProperty
type MockIStateQuery ¶ added in v1.0.6
type MockIStateQuery struct {
// contains filtered or unexported fields
}
MockIStateQuery is a mock of IStateQuery interface
func NewMockIStateQuery ¶ added in v1.0.6
func NewMockIStateQuery(ctrl *gomock.Controller) *MockIStateQuery
NewMockIStateQuery creates a new mock instance
func (*MockIStateQuery) EXPECT ¶ added in v1.0.6
func (m *MockIStateQuery) EXPECT() *MockIStateQueryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockIStateQuery) GetContractState ¶ added in v1.0.6
func (m *MockIStateQuery) GetContractState(contractid []byte, field string) ([]byte, *modules.StateVersion, error)
GetContractState mocks base method
func (*MockIStateQuery) GetContractStatesById ¶ added in v1.0.6
func (m *MockIStateQuery) GetContractStatesById(contractid []byte) (map[string]*modules.ContractStateValue, error)
GetContractStatesById mocks base method
func (*MockIStateQuery) GetContractStatesByPrefix ¶ added in v1.0.6
func (m *MockIStateQuery) GetContractStatesByPrefix(contractid []byte, prefix string) (map[string]*modules.ContractStateValue, error)
GetContractStatesByPrefix mocks base method
type MockIStateQueryMockRecorder ¶ added in v1.0.6
type MockIStateQueryMockRecorder struct {
// contains filtered or unexported fields
}
MockIStateQueryMockRecorder is the mock recorder for MockIStateQuery
func (*MockIStateQueryMockRecorder) GetContractState ¶ added in v1.0.6
func (mr *MockIStateQueryMockRecorder) GetContractState(contractid, field interface{}) *gomock.Call
GetContractState indicates an expected call of GetContractState
func (*MockIStateQueryMockRecorder) GetContractStatesById ¶ added in v1.0.6
func (mr *MockIStateQueryMockRecorder) GetContractStatesById(contractid interface{}) *gomock.Call
GetContractStatesById indicates an expected call of GetContractStatesById
func (*MockIStateQueryMockRecorder) GetContractStatesByPrefix ¶ added in v1.0.6
func (mr *MockIStateQueryMockRecorder) GetContractStatesByPrefix(contractid, prefix interface{}) *gomock.Call
GetContractStatesByPrefix indicates an expected call of GetContractStatesByPrefix
type RWSetBuilder ¶
type RWSetBuilder struct {
// contains filtered or unexported fields
}
func NewRWSetBuilder ¶
func NewRWSetBuilder() *RWSetBuilder
func (*RWSetBuilder) AddSupplyToken ¶
func (*RWSetBuilder) AddToReadSet ¶
func (b *RWSetBuilder) AddToReadSet(contractId []byte, ns string, key string, version *modules.StateVersion)
func (*RWSetBuilder) AddToWriteSet ¶
func (b *RWSetBuilder) AddToWriteSet(contractId []byte, ns string, key string, value []byte)
func (*RWSetBuilder) AddTokenPayOut ¶
func (*RWSetBuilder) DefineToken ¶
func (*RWSetBuilder) GetTokenDefine ¶
func (b *RWSetBuilder) GetTokenDefine(ns string) *modules.TokenDefine
func (*RWSetBuilder) GetTokenPayOut ¶
func (b *RWSetBuilder) GetTokenPayOut(ns string) []*modules.TokenPayOut
func (*RWSetBuilder) GetTokenSupply ¶
func (b *RWSetBuilder) GetTokenSupply(ns string) []*modules.TokenSupply
func (*RWSetBuilder) GetWriteSet ¶ added in v1.0.6
func (b *RWSetBuilder) GetWriteSet(contractId []byte, key string) ([]byte, error)
func (*RWSetBuilder) GetWriteSets ¶ added in v1.0.6
func (b *RWSetBuilder) GetWriteSets(contractId []byte) ([]*KVWrite, error)
type RwSetTxMgr ¶
type RwSetTxMgr struct {
// contains filtered or unexported fields
}
func NewRwSetMgr ¶
func NewRwSetMgr(name string) (*RwSetTxMgr, error)
func (*RwSetTxMgr) Close ¶
func (m *RwSetTxMgr) Close()
func (*RwSetTxMgr) CloseTxSimulator ¶
func (m *RwSetTxMgr) CloseTxSimulator(txId string) error
每次产块结束后,需要关闭该chainId的txsimulator.
func (*RwSetTxMgr) GetTxSimulator ¶ added in v1.0.6
func (m *RwSetTxMgr) GetTxSimulator(txId string) (TxSimulator, error)
func (*RwSetTxMgr) NewTxSimulator ¶
func (m *RwSetTxMgr) NewTxSimulator(idag IDataQuery, txId string) (TxSimulator, error)
NewTxSimulator implements method in interface `txmgmt.TxMgr`
type RwSetTxSimulator ¶
type RwSetTxSimulator struct {
// contains filtered or unexported fields
}
func NewBasedTxSimulator ¶
func NewBasedTxSimulator(txId string, idag IDataQuery, stateQ IStateQuery) *RwSetTxSimulator
func (*RwSetTxSimulator) CheckDone ¶
func (s *RwSetTxSimulator) CheckDone() error
func (*RwSetTxSimulator) DefineToken ¶
func (*RwSetTxSimulator) DeleteState ¶
func (s *RwSetTxSimulator) DeleteState(contractId []byte, ns string, key string) error
DeleteState implements method in interface `ledger.TxSimulator`
func (*RwSetTxSimulator) GetAllStates ¶ added in v1.0.6
func (s *RwSetTxSimulator) GetAllStates(contractid []byte, ns string) (map[string]*modules.ContractStateValue, error)
get all dag
func (*RwSetTxSimulator) GetContractState ¶ added in v1.0.6
func (s *RwSetTxSimulator) GetContractState(contractid []byte, field string) ([]byte, *modules.StateVersion, error)
func (*RwSetTxSimulator) GetContractStatesById ¶
func (s *RwSetTxSimulator) GetContractStatesById(contractid []byte) (map[string]*modules.ContractStateValue, error)
func (*RwSetTxSimulator) GetContractStatesByPrefix ¶ added in v1.0.6
func (s *RwSetTxSimulator) GetContractStatesByPrefix(contractid []byte, prefix string) (map[string]*modules.ContractStateValue, error)
func (*RwSetTxSimulator) GetGlobalProp ¶ added in v1.0.2
func (s *RwSetTxSimulator) GetGlobalProp() ([]byte, error)
func (*RwSetTxSimulator) GetPayOutData ¶
func (s *RwSetTxSimulator) GetPayOutData(ns string) ([]*modules.TokenPayOut, error)
func (*RwSetTxSimulator) GetRwData ¶
func (s *RwSetTxSimulator) GetRwData(ns string) ([]*KVRead, []*KVWrite, error)
func (*RwSetTxSimulator) GetStableTransactionByHash ¶ added in v1.0.5
func (s *RwSetTxSimulator) GetStableTransactionByHash(ns string, hash common.Hash) (*modules.Transaction, error)
func (*RwSetTxSimulator) GetStableUnit ¶ added in v1.0.5
func (*RwSetTxSimulator) GetStatesByPrefix ¶
func (*RwSetTxSimulator) GetTimestamp ¶
func (s *RwSetTxSimulator) GetTimestamp(ns string, rangeNumber uint32) ([]byte, error)
GetState implements method in interface `ledger.TxSimulator`
func (*RwSetTxSimulator) GetTokenBalance ¶
func (*RwSetTxSimulator) GetTokenDefineData ¶
func (s *RwSetTxSimulator) GetTokenDefineData(ns string) (*modules.TokenDefine, error)
func (*RwSetTxSimulator) GetTokenSupplyData ¶
func (s *RwSetTxSimulator) GetTokenSupplyData(ns string) ([]*modules.TokenSupply, error)
func (*RwSetTxSimulator) PayOutToken ¶
func (*RwSetTxSimulator) Rollback ¶ added in v1.0.6
func (s *RwSetTxSimulator) Rollback() error
func (*RwSetTxSimulator) String ¶
func (s *RwSetTxSimulator) String() string
func (*RwSetTxSimulator) SupplyToken ¶
type TxManager ¶
type TxManager interface { Close() CloseTxSimulator(txId string) error NewTxSimulator(idag IDataQuery, txId string) (TxSimulator, error) GetTxSimulator(txId string) (TxSimulator, error) }
var RwM TxManager
type TxSimulator ¶
type TxSimulator interface { IStateQuery GetState(contractId []byte, ns string, key string) ([]byte, error) GetAllStates(contractId []byte, ns string) (map[string]*modules.ContractStateValue, error) GetStatesByPrefix(contractId []byte, ns string, prefix string) ([]*modules.KeyValue, error) GetTimestamp(ns string, rangeNumber uint32) ([]byte, error) SetState(contractid []byte, ns string, key string, value []byte) error GetTokenBalance(ns string, addr common.Address, asset *modules.Asset) (map[modules.Asset]uint64, error) GetStableTransactionByHash(ns string, hash common.Hash) (*modules.Transaction, error) GetStableUnit(ns string, hash common.Hash, unitNumber uint64) (*modules.Unit, error) PayOutToken(ns string, address string, token *modules.Asset, amount uint64, lockTime uint32) error DefineToken(ns string, tokenType int32, define []byte, creator string) error SupplyToken(ns string, assetId, uniqueId []byte, amt uint64, creator string) error DeleteState(contractId []byte, ns string, key string) error GetRwData(ns string) ([]*KVRead, []*KVWrite, error) GetPayOutData(ns string) ([]*modules.TokenPayOut, error) GetTokenDefineData(ns string) (*modules.TokenDefine, error) GetTokenSupplyData(ns string) ([]*modules.TokenSupply, error) //GetTxSimulationResults() ([]byte, error) CheckDone() error Done() Close() Rollback() error String() string //GetChainParameters() ([]byte, error) GetGlobalProp() ([]byte, error) }