commit b75c782cdab980e36a418ed431a716e5bc6ba915
parent 8bc5439de2a0c7c4f4de508a2d89549abf27f9eb
Author: lash <dev@holbrook.no>
Date: Wed, 3 Apr 2024 15:05:47 +0100
Handle hex and int source for fee limit / cost
Diffstat:
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/chainlib/eth/block.py b/chainlib/eth/block.py
@@ -160,6 +160,16 @@ class Block(BaseBlock, Src):
def to_human(self):
+ try:
+ self.fee_limit = hex_to_int(self.fee_limit)
+ except TypeError:
+ pass
+
+ try:
+ self.fee_cost = hex_to_int(self.fee_cost)
+ except TypeError:
+ pass
+
s = """hash: {}
number: {}
parent: {}
@@ -176,8 +186,8 @@ txs: {}
self.timestamp,
datetime.datetime.fromtimestamp(self.timestamp),
self.author,
- hex_to_int(self.fee_limit),
- hex_to_int(self.fee_cost),
+ self.fee_limit,
+ self.fee_cost,
len(self.txs),
)
diff --git a/setup.cfg b/setup.cfg
@@ -1,6 +1,6 @@
[metadata]
name = chainlib-eth
-version = 0.6.0
+version = 0.6.1
description = Ethereum implementation of the chainlib interface
author = Louis Holbrook
author_email = dev@holbrook.no