eth-monitor

Monitor and cache ethereum transactions with match filters
git clone git://git.defalsify.org/eth-monitor.git
Info | Log | Files | Refs | README | LICENSE

run.py (301B)


      1 # standard imports
      2 import os
      3 
      4 
      5 class Filter:
      6 
      7     def __init__(self, run_dir):
      8         self.run_dir = run_dir
      9         self.fp = os.path.join(run_dir, 'block')
     10 
     11 
     12     def filter(self, conn, block):
     13         f = open(self.fp, 'w')
     14         f.write(str(block.number))
     15         f.close()
     16         return False