put to private key with a collection is not exists
(stub shim.ChaincodeStubInterface, numberCallsPut string)
| 90 | |
| 91 | // put to private key with a collection is not exists |
| 92 | func (t *Operations) putPrivateKey(stub shim.ChaincodeStubInterface, numberCallsPut string) *pb.Response { |
| 93 | cntCall, _ := strconv.Atoi(numberCallsPut) |
| 94 | |
| 95 | for i := range cntCall { |
| 96 | key := "key" + strconv.Itoa(i) |
| 97 | col := "col" + strconv.Itoa(i) |
| 98 | err := stub.PutPrivateData(col, key, []byte(key)) |
| 99 | if err != nil { |
| 100 | return shim.Error(err.Error()) |
| 101 | } |
| 102 | } |
| 103 | return shim.Success(nil) |
| 104 | } |
| 105 | |
| 106 | // getMultiple - get multiple states |
| 107 | func (t *Operations) getMultiple(stub shim.ChaincodeStubInterface, countKeys string) *pb.Response { |
no test coverage detected