commit b1e71dc50e22cb67f59c55471e739de99fe67624
parent 7d72fedd736b859c49f51a8e35e0ee9196f245a3
Author: lash <dev@holbrook.no>
Date: Thu, 13 Oct 2022 13:48:33 +0000
Handle none rcpt when adding tx
Diffstat:
3 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
@@ -1,3 +1,5 @@
+- 0.1.6
+ * Do not crash when result member not set on tx
- 0.1.5
* Upgrade chainlib to 0.3.0
- 0.1.4
diff --git a/eth_cache/store/file.py b/eth_cache/store/file.py
@@ -64,10 +64,9 @@ class FileStore:
if include_data:
src = json.dumps(tx.src).encode('utf-8')
self.tx_dir.add(bytes.fromhex(strip_0x(tx.hash)), src)
-
- rcpt_src = tx.result.src
- logg.debug('rcpt {}'.format(rcpt_src))
- if rcpt_src != None:
+
+ if tx.result != None:
+ rcpt_src = tx.result.src
rcpt_src = json.dumps(rcpt_src).encode('utf-8')
self.rcpt_dir.add(bytes.fromhex(strip_0x(tx.hash)), rcpt_src)
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = eth-cache
-version = 0.1.5
+version = 0.1.6
description = Ethereum chain data caching tools
author = Louis Holbrook
author_email = dev@holbrook.no