Skip to content

Commit

Permalink
[FAB-2359] Fix Broken Master
Browse files Browse the repository at this point in the history
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 <jyellick@us.ibm.com>
  • Loading branch information
Jason Yellick committed Feb 18, 2017
1 parent 5525d4d commit 2ecb22a
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions core/common/validation/msgvalidation.go
Original file line number Diff line number Diff line change
Expand Up @@ -371,20 +371,20 @@ func ValidateTransaction(e *common.Envelope) (*common.Payload, error) {

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

// Verify that the transaction ID has been computed properly.
// This check is needed to ensure that the lookup into the ledger
// for the same TxID catches duplicates.
err = utils.CheckProposalTxID(
payload.Header.ChannelHeader.TxId,
payload.Header.SignatureHeader.Nonce,
payload.Header.SignatureHeader.Creator)
if err != nil {
return nil, err
}

// continue the validation in a way that depends on the type specified in the header
switch common.HeaderType(payload.Header.ChannelHeader.Type) {
case common.HeaderType_ENDORSER_TRANSACTION:
// Verify that the transaction ID has been computed properly.
// This check is needed to ensure that the lookup into the ledger
// for the same TxID catches duplicates.
err = utils.CheckProposalTxID(
payload.Header.ChannelHeader.TxId,
payload.Header.SignatureHeader.Nonce,
payload.Header.SignatureHeader.Creator)
if err != nil {
return nil, err
}

err = validateEndorserTransaction(payload.Data, payload.Header)
putilsLogger.Infof("ValidateTransactionEnvelope returns err %s", err)
return payload, err
Expand Down

0 comments on commit 2ecb22a

Please sign in to comment.