If you set up an event listener with Geth (I assume also with Parity) you get notifications when a particular event shows up in the event logs.
Sometimes a reorg will happen, and the block where that event happened will be orphaned and disappear from the main history. The same transaction may cause an event to be raised in a different block.
Is the following correct?
- An event will always be fired when a block generating that event gets into what the node considers the main chain
- If there's a big reorg events several blocks deep will be sent out almost simultaneously
- An event will still be sent out again even if its content (aside from block hash etc) is the same, so for example if you listen for a contract that raises an event when it's paid, you may get the same event twice even though you'll ultimately only end up getting paid once
Are there any traps for the unwary or interesting implementation-specific wrinkles?