1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 | package main import "fmt" import "github.com/hyperledger/fabric/core/chaincode/shim" type SampleChaincode struct { } func (t *SampleChaincode) Init(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) { return nil, nil } func (t *SampleChaincode) Query(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) { return nil, nil } func (t *SampleChaincode) Invoke(stub shim.ChaincodeStubInterface, function string, args []string) ([]byte, error) { return nil, nil } func main() { err := shim.Start(new(SampleChaincode)) if err != nil { fmt.Println("Could not start SampleChaincode") } else { fmt.Println("SampleChaincode successfully started") } } |
1 2 3 4 5 6 7 8 9 | func main() { err := shim.Start(new(SampleChaincode)) if err != nil { fmt.Println("Could not start SampleChaincode") } else { fmt.Println("SampleChaincode successfully started") } } |
欢迎光临 电子技术论坛_中国专业的电子工程师学习交流社区-中电网技术论坛 (http://bbs.eccn.com/) | Powered by Discuz! 7.0.0 |