core/txpool: make transaction validation reusable across packages (pools) #27429
+336
−180
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.
The blobpool coming in a followup PR will be a separare tx pool, but it needs some shared functionality with the main transaction pool. Specifically in the context of this PR, the blobpool will need almost the exact same transaction validations with minor tweaks.
As such, this PR does a reparatory work to make the transaction validation reusable across multiple txpool implementations. The PR also does some minor refactorings to clean up some method names.
A next PR will move tx txpool itself into a legacy "subpool" pool, so I'd like to merge in all functional changes first and have the move into a new package be mostly just code moving and import path reworking (TM).
If you're curious how these are used in the blobpool (to verify the abstraction), this PR contains all the code: #26940