mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-17 15:35:09 +00:00
[FAB-15119] Fix BYFN with Java chaincode
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>
This commit is contained in:
parent
1bd1c2f355
commit
f5278157ac
1 changed files with 0 additions and 4 deletions
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue