4
0
mirror of git://holbrook.no/eth-monitor.git synced 2024-11-22 20:16:45 +01:00
eth-monitor/eth_monitor/store/null.py

40 lines
615 B
Python
Raw Normal View History

# standard imports
import os
import logging
import json
logg = logging.getLogger(__name__)
class NullStore:
def put_tx(self, tx, include_data=False):
pass
def put_block(self, block, include_data=False):
pass
2022-02-27 14:52:05 +01:00
def get_block_number(self, v):
raise FileNotFoundError(v)
def get_block(self, v):
raise FileNotFoundError(v)
def get_tx(self, v):
raise FileNotFoundError(v)
def get_rcpt(self, v):
raise FileNotFoundError(v)
def __init__(self):
self.chain_dir = '/dev/null'
def __str__(self):
return "Nullstore"