Skip to content

Commit b7813ef

Browse files
committed
Fixed use of incorrect error variable
Change-Id: Ifcda6ce5f3ec4714fea17519bd041343e4461751 Signed-off-by: jiangyaoguo <[email protected]>
1 parent 0c3fb65 commit b7813ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

core/chaincode/exectransaction_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -286,8 +286,8 @@ func invoke(ctx context.Context, spec *pb.ChaincodeSpec, typ pb.Transaction_Type
286286
ledger, _ := ledger.GetLedger()
287287
ledger.BeginTxBatch("1")
288288
retval, ccevt, execErr = Execute(ctx, GetChain(DefaultChain), transaction)
289-
if err != nil {
290-
return nil, uuid, nil, fmt.Errorf("Error invoking chaincode: %s ", err)
289+
if execErr != nil {
290+
return nil, uuid, nil, fmt.Errorf("Error invoking chaincode: %s ", execErr)
291291
}
292292
ledger.CommitTxBatch("1", []*pb.Transaction{transaction}, nil, nil)
293293
}

0 commit comments

Comments
 (0)