Skip to content

Commit 2ecb22a

Browse files
author
Jason Yellick
committed
[FAB-2359] Fix Broken Master
https://jira.hyperledger.org/browse/FAB-2359 The introduction of the TxID checks on configuration transactions has broken master. This should be addressed more directly, but it is causing all CI to fail. This makes the checks only apply to endorser transactions. Change-Id: I1c6c7536f83e42f0281d18f8d7b147dcb243175a Signed-off-by: Jason Yellick <[email protected]>
1 parent 5525d4d commit 2ecb22a

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

core/common/validation/msgvalidation.go

+11-11
Original file line numberDiff line numberDiff line change
@@ -371,20 +371,20 @@ func ValidateTransaction(e *common.Envelope) (*common.Payload, error) {
371371

372372
// TODO: ensure that creator can transact with us (some ACLs?) which set of APIs is supposed to give us this info?
373373

374-
// Verify that the transaction ID has been computed properly.
375-
// This check is needed to ensure that the lookup into the ledger
376-
// for the same TxID catches duplicates.
377-
err = utils.CheckProposalTxID(
378-
payload.Header.ChannelHeader.TxId,
379-
payload.Header.SignatureHeader.Nonce,
380-
payload.Header.SignatureHeader.Creator)
381-
if err != nil {
382-
return nil, err
383-
}
384-
385374
// continue the validation in a way that depends on the type specified in the header
386375
switch common.HeaderType(payload.Header.ChannelHeader.Type) {
387376
case common.HeaderType_ENDORSER_TRANSACTION:
377+
// Verify that the transaction ID has been computed properly.
378+
// This check is needed to ensure that the lookup into the ledger
379+
// for the same TxID catches duplicates.
380+
err = utils.CheckProposalTxID(
381+
payload.Header.ChannelHeader.TxId,
382+
payload.Header.SignatureHeader.Nonce,
383+
payload.Header.SignatureHeader.Creator)
384+
if err != nil {
385+
return nil, err
386+
}
387+
388388
err = validateEndorserTransaction(payload.Data, payload.Header)
389389
putilsLogger.Infof("ValidateTransactionEnvelope returns err %s", err)
390390
return payload, err

0 commit comments

Comments
 (0)