MCPcopy
hub / github.com/hyperledger/fabric / getKey

Method getKey

integration/chaincode/multi/chaincode.go:81–89  ·  view source on GitHub ↗
(stub shim.ChaincodeStubInterface, keyUniq string)

Source from the content-addressed store, hash-verified

79}
80
81func (t *Operations) getKey(stub shim.ChaincodeStubInterface, keyUniq string) *pb.Response {
82 key := "key" + keyUniq
83 resp, err := stub.GetState(key)
84 if err != nil {
85 return shim.Error(err.Error())
86 }
87
88 return shim.Success(resp)
89}
90
91// put to private key with a collection is not exists
92func (t *Operations) putPrivateKey(stub shim.ChaincodeStubInterface, numberCallsPut string) *pb.Response {

Callers 1

InvokeMethod · 0.95

Calls 2

GetStateMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected