@@ -60,7 +60,7 @@ func GetPayloads(txActions *peer.TransactionAction) (*peer.ChaincodeActionPayloa
60
60
return ccPayload , respPayload , nil
61
61
}
62
62
63
- // GetEndorserTxFromBlock gets Transaction from Block. Data.Data
63
+ // GetEnvelopeFromBlock gets an envelope from a block's Data field.
64
64
func GetEnvelopeFromBlock (data []byte ) (* common.Envelope , error ) {
65
65
//Block always begins with an envelope
66
66
var err error
@@ -72,7 +72,7 @@ func GetEnvelopeFromBlock(data []byte) (*common.Envelope, error) {
72
72
return env , nil
73
73
}
74
74
75
- // assemble an Envelope message from proposal, endorsements and a signer.
75
+ // CreateSignedTx assembles an Envelope message from proposal, endorsements, and a signer.
76
76
// This function should be called by a client when it has collected enough endorsements
77
77
// for a proposal to create a transaction and submit it to peers for ordering
78
78
func CreateSignedTx (proposal * peer.Proposal , signer msp.SigningIdentity , resps ... * peer.ProposalResponse ) (* common.Envelope , error ) {
@@ -182,6 +182,7 @@ func CreateSignedTx(proposal *peer.Proposal, signer msp.SigningIdentity, resps .
182
182
return & common.Envelope {Payload : paylBytes , Signature : sig }, nil
183
183
}
184
184
185
+ // CreateProposalResponse creates a proposal response.
185
186
func CreateProposalResponse (hdr []byte , payl []byte , results []byte , events []byte , visibility []byte , signingEndorser msp.SigningIdentity ) (* peer.ProposalResponse , error ) {
186
187
// obtain the proposal hash given proposal header, payload and the requested visibility
187
188
pHashBytes , err := GetProposalHash1 (hdr , payl , visibility )
0 commit comments