3 Star 6 Fork 7

Gitee 极速下载/Hyperledger fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/hyperledger/fabric
克隆/下载
txsim.go 3.96 KB
一键复制 编辑 原始数据 按行查看 历史
/*
Copyright IBM Corp. 2018 All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
package mocks
import (
commonledger "github.com/hyperledger/fabric/common/ledger"
"github.com/hyperledger/fabric/core/ledger"
)
type MockTxSim struct {
GetTxSimulationResultsRv *ledger.TxSimulationResults
}
func (m *MockTxSim) GetState(namespace string, key string) ([]byte, error) {
return nil, nil
}
func (m *MockTxSim) GetStateMultipleKeys(namespace string, keys []string) ([][]byte, error) {
return nil, nil
}
func (m *MockTxSim) GetStateRangeScanIterator(namespace string, startKey string, endKey string) (commonledger.ResultsIterator, error) {
return nil, nil
}
func (m *MockTxSim) GetStateRangeScanIteratorWithMetadata(namespace string, startKey, endKey string, metadata map[string]interface{}) (ledger.QueryResultsIterator, error) {
return nil, nil
}
func (m *MockTxSim) ExecuteQuery(namespace, query string) (commonledger.ResultsIterator, error) {
return nil, nil
}
func (m *MockTxSim) ExecuteQueryWithMetadata(namespace, query string, metadata map[string]interface{}) (ledger.QueryResultsIterator, error) {
return nil, nil
}
func (m *MockTxSim) Done() {
}
func (m *MockTxSim) SetState(namespace string, key string, value []byte) error {
return nil
}
func (m *MockTxSim) DeleteState(namespace string, key string) error {
return nil
}
func (m *MockTxSim) SetStateMultipleKeys(namespace string, kvs map[string][]byte) error {
return nil
}
func (m *MockTxSim) ExecuteUpdate(query string) error {
return nil
}
func (m *MockTxSim) GetTxSimulationResults() (*ledger.TxSimulationResults, error) {
return m.GetTxSimulationResultsRv, nil
}
func (m *MockTxSim) DeletePrivateData(namespace, collection, key string) error {
return nil
}
func (m *MockTxSim) ExecuteQueryOnPrivateData(namespace, collection, query string) (commonledger.ResultsIterator, error) {
return nil, nil
}
func (m *MockTxSim) GetPrivateData(namespace, collection, key string) ([]byte, error) {
return nil, nil
}
func (m *MockTxSim) GetPrivateDataHash(namespace, collection, key string) ([]byte, error) {
return nil, nil
}
func (m *MockTxSim) GetPrivateDataMultipleKeys(namespace, collection string, keys []string) ([][]byte, error) {
return nil, nil
}
func (m *MockTxSim) GetPrivateDataRangeScanIterator(namespace, collection, startKey, endKey string) (commonledger.ResultsIterator, error) {
return nil, nil
}
func (m *MockTxSim) SetPrivateData(namespace, collection, key string, value []byte) error {
return nil
}
func (m *MockTxSim) SetPrivateDataMultipleKeys(namespace, collection string, kvs map[string][]byte) error {
return nil
}
func (m *MockTxSim) GetStateMetadata(namespace, key string) (map[string][]byte, error) {
return nil, nil
}
func (m *MockTxSim) GetPrivateDataMetadata(namespace, collection, key string) (map[string][]byte, error) {
return nil, nil
}
func (m *MockTxSim) GetPrivateDataMetadataByHash(namespace, collection string, keyhash []byte) (map[string][]byte, error) {
return nil, nil
}
func (m *MockTxSim) SetStateMetadata(namespace, key string, metadata map[string][]byte) error {
return nil
}
func (m *MockTxSim) DeleteStateMetadata(namespace, key string) error {
return nil
}
func (m *MockTxSim) SetPrivateDataMetadata(namespace, collection, key string, metadata map[string][]byte) error {
return nil
}
func (m *MockTxSim) DeletePrivateDataMetadata(namespace, collection, key string) error {
return nil
}
type MockChaincodeDefinition struct {
NameRv string
VersionRv string
EndorsementStr string
ValidationStr string
ValidationBytes []byte
HashRv []byte
}
func (m *MockChaincodeDefinition) CCName() string {
return m.NameRv
}
func (m *MockChaincodeDefinition) Hash() []byte {
return m.HashRv
}
func (m *MockChaincodeDefinition) CCVersion() string {
return m.VersionRv
}
func (m *MockChaincodeDefinition) Validation() (string, []byte) {
return m.ValidationStr, m.ValidationBytes
}
func (m *MockChaincodeDefinition) Endorsement() string {
return m.EndorsementStr
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/mirrors/fabric.git
git@gitee.com:mirrors/fabric.git
mirrors
fabric
Hyperledger fabric
v2.0.1

搜索帮助

0d507c66 1850385 C8b1a773 1850385