node/pkg/ethereum: fix unreachable nil check

The program would've crashed on `l.Address` before it
could reach the nilness check.

commit-id:17b64899
This commit is contained in:
Leopold Schabel 2022-04-08 13:32:05 +02:00 committed by Evan Gray
parent 74fdb3a4eb
commit 1fd6e14885
1 changed files with 3 additions and 3 deletions

View File

@ -60,12 +60,12 @@ func MessageEventsForTransaction(
// Extract logs
for _, l := range receipt.Logs {
// SECURITY: Skip logs not produced by our contract.
if l.Address != contract {
if l == nil {
continue
}
if l == nil {
// SECURITY: Skip logs not produced by our contract.
if l.Address != contract {
continue
}