Handle 'none' gasprice field
This commit is contained in:
parent
625f53b95a
commit
7abe64e48f
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user