ethereum / execution-specs

Specification for the Execution Layer. Tracking network upgrades.
Creative Commons Zero v1.0 Universal
808 stars 222 forks source link

In `fork.py`'s `make_receipt`, multiple `if`/`return` blocks are followed by an `else` #874

Closed SamWilsn closed 4 months ago

SamWilsn commented 5 months ago

For example:

https://github.com/ethereum/execution-specs/blob/cd9b7d6a9af2f5e07cad02a4971744dd6a553b10/src/ethereum/london/fork.py#L484-L489

This is a really weird construct. Either they should all be elif or we shouldn't have the else:.

_Originally posted by @SamWilsn in https://github.com/ethereum/execution-specs/pull/867#discussion_r1475032326_

richardgreg commented 4 months ago

Could you assign me to this task?

SamWilsn commented 4 months ago

@richardgreg feel free to take a stab at it (don't forget to make a separate PR targeting forks/cancun). Thanks!

richardgreg commented 4 months ago

~(don't forget to make a separate PR targeting forks/cancun)~. Thanks!

Because of the above comment, I opened a PR targeting the cancun branch. lol. I hope I did the right thing. If not, let me know and I'll open it against the master branch 🙂