omni / poa-bridge

POA <-> Ethereum bridge for self transfers of POA native token to POA20 (ERC20 representation). Not supported. Use TokenBridge instead
https://github.com/poanetwork/token-bridge
GNU General Public License v3.0
79 stars 38 forks source link

Problem: eth_getLogs returning no logs in some cases #71

Closed yrashk closed 6 years ago

yrashk commented 6 years ago

Sometimes there's an event and eth_getLogs returns nothing.

Solution: trim the nulls from the topic filter's tail

It appears that in some implementations or setups eth_getLogs topics: [A, null, null, null] won't return logs when only [A] was there.

This patch is a quick workaround that trims nulls from that said tail. A proper fix would likely require an incursion into ethabi to make Topic optional.