Skip to content

Commit

Permalink
[FAB-5681] Expose ability to SendTransactionProposal
Browse files Browse the repository at this point in the history
-Rename sendTransactionProposal TO SendTransactionProposalWithChannelID

Change-Id: I410ac28b8875f5aa5ac615e3c0c3e2cf25a687cf
Signed-off-by: Firas Qutishat <[email protected]>
  • Loading branch information
fqutishat committed Aug 9, 2017
1 parent 77507d9 commit 6ed4b84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/fabric-client/channel/query.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ func queryByChaincode(channelID string, request txn.ChaincodeInvokeRequest, clie
return nil, err
}

transactionProposalResponses, _, err := sendTransactionProposal(channelID, request, clientContext)
transactionProposalResponses, _, err := SendTransactionProposalWithChannelID(channelID, request, clientContext)
if err != nil {
return nil, fmt.Errorf("SendTransactionProposal return error: %v", err)
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/fabric-client/channel/txnproposer.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ func (c *Channel) SendTransactionProposal(request apitxn.ChaincodeInvokeRequest)
return nil, apitxn.TransactionID{}, err
}

return sendTransactionProposal(c.name, request, c.clientContext)
return SendTransactionProposalWithChannelID(c.name, request, c.clientContext)
}

// sendTransactionProposal sends the created proposal to peer for endorsement.
// SendTransactionProposalWithChannelID sends the created proposal to peer for endorsement.
// TODO: return the entire request or just the txn ID?
func sendTransactionProposal(channelID string, request apitxn.ChaincodeInvokeRequest, clientContext ClientContext) ([]*apitxn.TransactionProposalResponse, apitxn.TransactionID, error) {
func SendTransactionProposalWithChannelID(channelID string, request apitxn.ChaincodeInvokeRequest, clientContext ClientContext) ([]*apitxn.TransactionProposalResponse, apitxn.TransactionID, error) {
if err := validateChaincodeInvokeRequest(request); err != nil {
return nil, apitxn.TransactionID{}, fmt.Errorf("Required parameters are empty: %s", err)
}
Expand Down

0 comments on commit 6ed4b84

Please sign in to comment.