commit 924e48b63bf433e3ad45a181df500a8f43a219ee
parent d3d8e5be54a8a9e43d44231eca2bcdfe2dbe0d36
Author: lash <dev@holbrook.no>
Date: Tue, 10 May 2022 18:29:32 +0000
Update file store for chainlib 0.2.0
Diffstat:
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,3 +1,7 @@
+- 0.1.4
+ * Update file store on chainlib 0.2.0
+- 0.1.3
+ * Upgrade deps
- 0.1.2
* Upgrade deps
- 0.1.1
diff --git a/eth_cache/store/file.py b/eth_cache/store/file.py
@@ -25,7 +25,7 @@ def chain_dir_for(chain_spec, base_dir=default_base_dir):
class FileStore:
def put_tx(self, tx, include_data=False):
- raw = pack(tx.src(), self.chain_spec)
+ raw = pack(tx.src, self.chain_spec)
tx_hash_dirnormal = strip_0x(tx.hash).upper()
tx_hash_bytes = bytes.fromhex(tx_hash_dirnormal)
self.tx_raw_dir.add(tx_hash_bytes, raw)
@@ -62,10 +62,10 @@ class FileStore:
f.close()
if include_data:
- src = json.dumps(tx.src()).encode('utf-8')
+ src = json.dumps(tx.src).encode('utf-8')
self.tx_dir.add(bytes.fromhex(strip_0x(tx.hash)), src)
- rcpt_src = tx.rcpt_src()
+ rcpt_src = tx.result.src
logg.debug('rcpt {}'.format(rcpt_src))
if rcpt_src != None:
rcpt_src = json.dumps(rcpt_src).encode('utf-8')
@@ -79,7 +79,7 @@ class FileStore:
num_bytes = block.number.to_bytes(8, 'big')
self.block_hash_dir.add(hash_bytes, num_bytes)
if include_data:
- src = json.dumps(block.src()).encode('utf-8')
+ src = json.dumps(block.src).encode('utf-8')
self.block_src_dir.add(hash_bytes, src)
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = eth-cache
-version = 0.1.3
+version = 0.1.4
description = Ethereum chain data caching tools
author = Louis Holbrook
author_email = dev@holbrook.no