Skip to content

Commit a15d984

Browse files
committed
Amend mockstub.InvokeChaincode comments
Change-Id: Idf05c9ada738e42cb2912e9eae4b04bdf91e221a Signed-off-by: jiangyaoguo <[email protected]>
1 parent 8ea25a9 commit a15d984

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

core/chaincode/shim/mockstub.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,9 @@ func (stub *MockStub) DeleteRow(tableName string, key []Column) error {
227227
}
228228

229229
// Invokes a peered chaincode.
230-
// E.g. stub1.InvokeChaincode("stub2Hash", func, args)
230+
// E.g. stub1.InvokeChaincode("stub2Hash", funcArgs)
231231
// Before calling this make sure to create another MockStub stub2, call stub2.MockInit(uuid, func, args)
232-
// and register it with stub1 by calling stub1.MockPeerChaincode(
232+
// and register it with stub1 by calling stub1.MockPeerChaincode("stub2Hash", stub2)
233233
func (stub *MockStub) InvokeChaincode(chaincodeName string, args [][]byte) ([]byte, error) {
234234
// TODO "args" here should possibly be a serialized pb.ChaincodeInput
235235
function, params := getFuncArgs(args)
@@ -249,10 +249,10 @@ func (stub *MockStub) QueryChaincode(chaincodeName string, args [][]byte) ([]byt
249249
mockLogger.Error("Could not find peer chaincode to query", chaincodeName)
250250
return nil, errors.New("Could not find peer chaincode to query")
251251
}
252-
mockLogger.Debug("MockStub", stub.Name, "Invoking peer chaincode", otherStub.Name, args)
252+
mockLogger.Debug("MockStub", stub.Name, "Querying peer chaincode", otherStub.Name, args)
253253
function, params := getFuncArgs(args)
254254
bytes, err := otherStub.MockQuery(function, params)
255-
mockLogger.Debug("MockStub", stub.Name, "Invoked peer chaincode", otherStub.Name, "got", bytes, err)
255+
mockLogger.Debug("MockStub", stub.Name, "Queried peer chaincode", otherStub.Name, "got", bytes, err)
256256
return bytes, err
257257
}
258258

0 commit comments

Comments
 (0)