4
0
mirror of git://holbrook.no/eth-monitor.git synced 2024-12-22 15:17:31 +01:00
eth-monitor/eth_monitor/callback.py
2022-05-07 11:33:35 +00:00

14 lines
256 B
Python

class BlockCallbackFilter:
def __init__(self):
self.filters = []
def register(self, fltr):
self.filters.append(fltr)
def filter(self, block, tx=None):
for fltr in self.filters:
fltr.filter(block, tx=tx)