eth-stat-syncer

Cache live EVM blockchain stats
git clone git://holbrook.no/eth-stat-syncer.git
Log | Files | Refs

commit 025e7286860bec749f6567271948a39ed03cb85d
parent 84e89dbfaec7586517c109eb1da54dc8bd841f83
Author: nolash <dev@holbrook.no>
Date:   Fri,  9 Apr 2021 12:45:25 +0200

WIP handle input parse

Diffstat:
Meth_stat_syncer/store.py | 15++++++++++++++-
Mrequirements.txt | 5+++--
2 files changed, 17 insertions(+), 3 deletions(-)

diff --git a/eth_stat_syncer/store.py b/eth_stat_syncer/store.py @@ -12,9 +12,14 @@ class RunStore: self.procstore = os.path.join(basedir, 'eth_stat_syncerd') + def get_postfix_path(self, name, postfix): + file_path = os.path.join(self.procstore, postfix, name) + return file_path + + def put(self, o, postfix): for k in o: - file_path = os.path.join(self.procstore, postfix, k) + file_path = self.get_postfix_path(k, postfix) d = os.path.dirname(file_path) try: os.stat(d) @@ -25,6 +30,14 @@ class RunStore: f.close() + def get(self, name, postfix): + file_path = self.get_postfix_path(name, postfix) + f = open(file_path, 'r') + r = f.read() + f.close() + return r + + class GasAggregator: def __init__(self, store, capacity): diff --git a/requirements.txt b/requirements.txt @@ -1,2 +1,3 @@ -chainsyncer==0.0.1a22 -chainlib==0.0.2a6 +chainsyncer~=0.0.1a22 +chainlib~=0.0.2a6 +jsonrpc_std~=0.0.1a1