Skip to content

Commit

Permalink
[FAB-7686] Panic when ESCC empty
Browse files Browse the repository at this point in the history
If the ESCC is empty, the peer panics.
Optimally, it should not panic and just fail the endorsement.

Change-Id: I8da1dd774fca26cdb118d8499da03eed96af81f0
Signed-off-by: yacovm <yacovm@il.ibm.com>
  • Loading branch information
yacovm committed Jan 10, 2018
1 parent d6e0b89 commit 845f7fe
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions core/endorser/endorser.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,9 +293,6 @@ func (e *Endorser) endorseProposal(ctx context.Context, chainID string, txid str
escc = "escc"
} else {
escc = cd.Endorsement()
if escc == "" { // this should never happen, LSCC always fills this field
panic("No ESCC specified in ChaincodeData")
}
}

endorserLogger.Debugf("info: escc for chaincode id %s is %s", ccid, escc)
Expand Down

0 comments on commit 845f7fe

Please sign in to comment.