eth-tester icon indicating copy to clipboard operation
eth-tester copied to clipboard

Gas Limit defined in two places?

Open fubuloubu opened this issue 7 years ago • 1 comments

What was wrong?

I went looking for where the gas limit is set and noticed the default number is set in two places? This didn't seem right. https://github.com/ethereum/eth-tester/blob/871932620a72862b814a57a9576fd3bbad5030d5/eth_tester/backends/pyevm/main.py#L81 https://github.com/ethereum/eth-tester/blob/9c852ddfc850f12ab48771332f519cb93ad85410/eth_tester/backends/mock/factory.py#L256

How can it be fixed?

Probably use the constant in make_genesis_block() as a default.

fubuloubu avatar Nov 13 '18 20:11 fubuloubu

These are two different backends (mock and py-evm), they shouldn't import from each other. It's possible that it could make sense to have it import from a third place, which would probably be something like eth-constants -- although that doesn't actually have any constants in it, just a TODO

carver avatar Nov 14 '18 01:11 carver