Commit b7813ef3 authored by jiangyaoguo's avatar jiangyaoguo
Browse files

Fixed use of incorrect error variable



Change-Id: Ifcda6ce5f3ec4714fea17519bd041343e4461751
Signed-off-by: default avatarjiangyaoguo <jiangyaoguo@gmail.com>
parent 0c3fb659
......@@ -286,8 +286,8 @@ func invoke(ctx context.Context, spec *pb.ChaincodeSpec, typ pb.Transaction_Type
ledger, _ := ledger.GetLedger()
ledger.BeginTxBatch("1")
retval, ccevt, execErr = Execute(ctx, GetChain(DefaultChain), transaction)
if err != nil {
return nil, uuid, nil, fmt.Errorf("Error invoking chaincode: %s ", err)
if execErr != nil {
return nil, uuid, nil, fmt.Errorf("Error invoking chaincode: %s ", execErr)
}
ledger.CommitTxBatch("1", []*pb.Transaction{transaction}, nil, nil)
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment