Collection < ProposalResponse > sendInstallProposal ( InstallProposalRequest installProposalRequest , Collection < Peer > peers ) throws ProposalException , InvalidArgumentException { checkChannelState ( ) ; checkPeers ( peers ) ; if ( null == installProposalRequest ) { throw new InvalidArgumentException ( "InstallProposalRequest is null" ) ; } try { TransactionContext transactionContext = getTransactionContext ( installProposalRequest . getUserContext ( ) ) ; transactionContext . verify ( false ) ; // Install will have no signing cause it's not really targeted to a channel. transactionContext . setProposalWaitTime ( installProposalRequest . getProposalWaitTime ( ) ) ; InstallProposalBuilder installProposalbuilder = InstallProposalBuilder . newBuilder ( ) ; installProposalbuilder . context ( transactionContext ) ; installProposalbuilder . setChaincodeLanguage ( installProposalRequest . getChaincodeLanguage ( ) ) ; installProposalbuilder . chaincodeName ( installProposalRequest . getChaincodeName ( ) ) ; installProposalbuilder . chaincodePath ( installProposalRequest . getChaincodePath ( ) ) ; installProposalbuilder . chaincodeVersion ( installProposalRequest . getChaincodeVersion ( ) ) ; installProposalbuilder . setChaincodeSource ( installProposalRequest . getChaincodeSourceLocation ( ) ) ; installProposalbuilder . setChaincodeInputStream ( installProposalRequest . getChaincodeInputStream ( ) ) ; installProposalbuilder . setChaincodeMetaInfLocation ( installProposalRequest . getChaincodeMetaInfLocation ( ) ) ; FabricProposal . Proposal deploymentProposal = installProposalbuilder . build ( ) ; SignedProposal signedProposal = getSignedProposal ( transactionContext , deploymentProposal ) ; return sendProposalToPeers ( peers , signedProposal , transactionContext ) ; } catch ( Exception e ) { throw new ProposalException ( e ) ; } }
Send install chaincode request proposal to the channel .