public Collection<ProposalResponse> sendUpgradeProposal(UpgradeProposalRequest upgradeProposalRequest, Collection<Peer> peers)
            throws InvalidArgumentException, ProposalException {

        checkChannelState();
        checkPeers(peers);

        if (null == upgradeProposalRequest) {
            throw new InvalidArgumentException("Upgradeproposal is null");
        }

        try {
            TransactionContext transactionContext = getTransactionContext(upgradeProposalRequest.getUserContext());
            //transactionContext.verify(false);  // Install will have no signing cause it's not really targeted to a channel.
            transactionContext.setProposalWaitTime(upgradeProposalRequest.getProposalWaitTime());
            UpgradeProposalBuilder upgradeProposalBuilder = UpgradeProposalBuilder.newBuilder();
            upgradeProposalBuilder.context(transactionContext);
            upgradeProposalBuilder.argss(upgradeProposalRequest.getArgs());
            upgradeProposalBuilder.chaincodeName(upgradeProposalRequest.getChaincodeName());
            upgradeProposalBuilder.chaincodePath(upgradeProposalRequest.getChaincodePath());
            upgradeProposalBuilder.chaincodeVersion(upgradeProposalRequest.getChaincodeVersion());
            upgradeProposalBuilder.chaincodEndorsementPolicy(upgradeProposalRequest.getChaincodeEndorsementPolicy());
            upgradeProposalBuilder.chaincodeCollectionConfiguration(upgradeProposalRequest.getChaincodeCollectionConfiguration());

            SignedProposal signedProposal = getSignedProposal(transactionContext, upgradeProposalBuilder.build());

            return sendProposalToPeers(peers, signedProposal, transactionContext);
        } catch (Exception e) {
            throw new ProposalException(e);
        }
    }
public Collection < ProposalResponse > sendUpgradeProposal ( UpgradeProposalRequest upgradeProposalRequest , Collection < Peer > peers ) throws InvalidArgumentException , ProposalException { checkChannelState ( ) ; checkPeers ( peers ) ; if ( null == upgradeProposalRequest ) { throw new InvalidArgumentException ( "Upgradeproposal is null" ) ; } try { TransactionContext transactionContext = getTransactionContext ( upgradeProposalRequest . getUserContext ( ) ) ; transactionContext . setProposalWaitTime ( upgradeProposalRequest . getProposalWaitTime ( ) ) ; UpgradeProposalBuilder upgradeProposalBuilder = UpgradeProposalBuilder . newBuilder ( ) ; upgradeProposalBuilder . context ( transactionContext ) ; upgradeProposalBuilder . argss ( upgradeProposalRequest . getArgs ( ) ) ; upgradeProposalBuilder . chaincodeName ( upgradeProposalRequest . getChaincodeName ( ) ) ; upgradeProposalBuilder . chaincodePath ( upgradeProposalRequest . getChaincodePath ( ) ) ; upgradeProposalBuilder . chaincodeVersion ( upgradeProposalRequest . getChaincodeVersion ( ) ) ; upgradeProposalBuilder . chaincodEndorsementPolicy ( upgradeProposalRequest . getChaincodeEndorsementPolicy ( ) ) ; upgradeProposalBuilder . chaincodeCollectionConfiguration ( upgradeProposalRequest . getChaincodeCollectionConfiguration ( ) ) ; SignedProposal signedProposal = getSignedProposal ( transactionContext , upgradeProposalBuilder . build ( ) ) ; return sendProposalToPeers ( peers , signedProposal , transactionContext ) ; } catch ( Exception e ) { throw new ProposalException ( e ) ; } }
Send Upgrade proposal proposal to upgrade chaincode to a new version.

@param upgradeProposalRequest
@param peers                  the specific peers to send to.
@return Collection of proposal responses.
@throws ProposalException
@throws InvalidArgumentException
@deprecated See new Lifecycle chaincode management.  {@link Channel#sendLifecycleApproveChaincodeDefinitionForMyOrgProposal(LifecycleApproveChaincodeDefinitionForMyOrgRequest, Peer)}