Skip to content

Commit

Permalink
[FAB-15119] Fix BYFN with Java chaincode
Browse files Browse the repository at this point in the history
The issue is that BYFN passes "Init" function while the
sample Java chaincode checks for "init" function.

Within the init function, there is no need to check the function
argument that is passed in. The sample Go chaincode and Node.js
chaincode do not check the function argument. This change makes
sample Java chaincode behave the same way.

Change-Id: I802978e1276e92a3d420b3f4a391ff66a352d321
Signed-off-by: David Enyeart <enyeart@us.ibm.com>
  • Loading branch information
denyeart committed Apr 9, 2019
1 parent 1bd1c2f commit f527815
Showing 1 changed file with 0 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ public class ABstore extends ChaincodeBase {
public Response init(ChaincodeStub stub) {
try {
_logger.info("Init java simple chaincode");
String func = stub.getFunction();
if (!func.equals("init")) {
return newErrorResponse("function other than init is not supported");
}
List<String> args = stub.getParameters();
if (args.size() != 4) {
newErrorResponse("Incorrect number of arguments. Expecting 4");
Expand Down

0 comments on commit f527815

Please sign in to comment.