Skip to content

Commit

Permalink
[FAB-6605]Filtered block event should have nil ccevent
Browse files Browse the repository at this point in the history
This CR ensures that filtered transactions within filtered
block contain a nil CcEvent if no chaincode event
is present. It previously included an empty ChaincodeEvent
message.

Change-Id: If872b9e2013a5c43a6eb8cc11d24fa771a0b483e
Signed-off-by: Will Lahti <wtlahti@us.ibm.com>
  • Loading branch information
wlahti committed Oct 12, 2017
1 parent 5a93a68 commit c803265
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion events/producer/eventhelper.go
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ func CreateBlockEvents(block *common.Block) (bevent *pb.Event, fbevent *pb.Event
ccEvent, err := utils.GetChaincodeEvents(caPayload.Events)
filteredTx := &pb.FilteredTransaction{Txid: chdr.TxId, TxValidationCode: txsFltr.Flag(txIndex)}

if ccEvent != nil {
if err != nil {
filteredCcEvent := ccEvent
// nil out ccevent payload
filteredCcEvent.Payload = nil
Expand Down

0 comments on commit c803265

Please sign in to comment.