org.hyperledger.fabric.sdk.UpgradeProposalRequest Java Examples
The following examples show how to use
org.hyperledger.fabric.sdk.UpgradeProposalRequest.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: QueryBlock.java From fabric-jdbc-connector with Apache License 2.0 | 6 votes |
private UpgradeProposalRequest getUpgradeProposalRequest(String chaincodeName, String chainCodeVersion, String chainCodePath, String chaincodeFunction, String[] chaincodeArgs, Endorsers endorsers) throws InvalidArgumentException { client.setUserContext(userOrg.getPeerAdmin()); ChaincodeID chaincodeID = ChaincodeID.newBuilder().setName(chaincodeName).setVersion(chainCodeVersion) .setPath(chainCodePath).build(); UpgradeProposalRequest upgradeProposalRequest = client.newUpgradeProposalRequest(); upgradeProposalRequest.setProposalWaitTime(conf.getProposalWaitTime()); upgradeProposalRequest.setChaincodeID(chaincodeID); upgradeProposalRequest.setFcn(chaincodeFunction); upgradeProposalRequest.setArgs(chaincodeArgs); if(endorsers != null) { ChaincodeEndorsementPolicy policy = getChaincodeEndorsementPolicy(endorsers); upgradeProposalRequest.setChaincodeEndorsementPolicy(policy); } return upgradeProposalRequest; }