Skip to content

Commit

Permalink
Merge "FAB-2368 check for transaction action existence"
Browse files Browse the repository at this point in the history
  • Loading branch information
jimthematrix authored and Gerrit Code Review committed Mar 1, 2017
2 parents a3f398f + dd9f5ea commit 56c9e4c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions protos/utils/proputils.go
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,10 @@ func GetActionFromEnvelope(envBytes []byte) (*peer.ChaincodeAction, error) {
return nil, err
}

if len(tx.Actions) == 0 {
return nil, fmt.Errorf("At least one TransactionAction is required")
}

_, respPayload, err := GetPayloads(tx.Actions[0])
return respPayload, err
}
Expand Down

0 comments on commit 56c9e4c

Please sign in to comment.