jacobkaufmann / evangelion

a prototype ethereum block builder
Apache License 2.0
83 stars 10 forks source link

fix: pass in post state instead of extending #47

Closed jacobkaufmann closed 1 year ago

jacobkaufmann commented 1 year ago

previously we were constructing a new PostState in each call to execute, passing that back to the caller in Execution, and calling extend on our top-level PostState to merge the pre and post-execution post states. however, the extend method did not behave according to expectations, and it would end up clearing information about the original post state.

this change alters the execute function to take a &mut PostState as an argument.