Handle 'none' gasprice field

This commit is contained in:
lash 2023-08-13 16:31:23 +01:00
parent 625f53b95a
commit 7abe64e48f
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746

View File

@ -1,5 +1,16 @@
from chainlib.dialect import DialectFilter as BaseDialectFilter
from chainlib.eth.dialect import DialectFilter as BaseDialectFilter
class DialectFilter(BaseDialectFilter):
def apply_block(self, block):
block.src['gas_limit'] = '0x0'
def apply_src(self, src):
src = super(DialectFilter, self).apply_src(src)
try:
if src['gas_price'] == None:
src['gas_price'] = '0x0'
except KeyError:
pass
return src