4
0
mirror of git://holbrook.no/eth-monitor.git synced 2024-11-16 10:16:48 +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)