Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This was an experiment to see if we could remove the confusing
'shorter
/'longer
lifetimes from the transform definition.And I think it was a success!
Decoupling the transform iterator from the rest of
ChainState
gives us two design improvements:reset
method from the ChainState,reset
is effectively a setup step that occurs after the constructor, which is something to be avoided.One downside is that calling the
call_next_transform
method is now a little more convoluted as it takes an arg.But I also think this makes it a little clearer what its actually doing.
I'll leave the PR as a draft for a while so I can think it over a bit.