6 Star 47 Fork 28

Hyperledger/fabric

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
main.go 1.11 KB
一键复制 编辑 原始数据 按行查看 历史
/*
* Copyright Greg Haskins All Rights Reserved
*
* SPDX-License-Identifier: Apache-2.0
*
* The purpose of this test code is to prove that the system properly packages
* up dependencies. We therefore synthesize the scenario where a chaincode
* imports non-standard dependencies both directly and indirectly and then
* expect a unit-test to verify that the package includes everything needed
* and ultimately builds properly.
*
*/
package main
import (
"fmt"
"github.com/hyperledger/fabric/core/chaincode/shim"
pb "github.com/hyperledger/fabric/protos/peer"
"github.com/hyperledger/fabric/test/chaincodes/AutoVendor/directdep"
)
// SimpleChaincode example simple Chaincode implementation
type SimpleChaincode struct {
}
func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response {
return shim.Error("NOT IMPL")
}
func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response {
return shim.Error("NOT IMPL")
}
func main() {
directdep.PointlessFunction()
err := shim.Start(new(SimpleChaincode))
if err != nil {
fmt.Printf("Error starting Simple chaincode: %s", err)
}
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hyperledger/fabric.git
git@gitee.com:hyperledger/fabric.git
hyperledger
fabric
fabric
v1.0.2

搜索帮助