-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tx-pool: Make txpool independent of primitive tx types #9916
Conversation
@tcoratger Just want to make sure i'm not blocking you here or anything? looks like its a finished version of mine! |
@JackG-eth I think this will be reviewed soon by @mattsse but this is just scaffolding as the issue was "quite urgent" but this doesn't close completely the issue as we still have the constraints: /// Trait for transaction types used inside the pool
pub trait PoolTransaction:
fmt::Debug
+ Send
+ Sync
+ Clone
+ From<PooledTransactionsElementEcRecovered>
+ TryFrom<TransactionSignedEcRecovered>
+ Into<TransactionSignedEcRecovered>
{ with + From<PooledTransactionsElementEcRecovered>
+ TryFrom<TransactionSignedEcRecovered>
+ Into<TransactionSignedEcRecovered> that should be removed completely in the abstracted version to close the issue. Indeed, in the end what we want is to no longer depend in this trait on specific type of transactions and this is not yet the case here. I just made simplifications and put the necessary types in place to facilitate the work later as doing everything on a single PR would have been too long and time consuming to review. What I think you can do is once this PR is merged you can go back from there to do the final abstraction and finish the job, wdyt @mattsse ? |
great, this sgtm! reviewing in a bit, ty! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
clean, ty for doing this incrementally
pending conflict
+ Clone | ||
+ From<PooledTransactionsElementEcRecovered> | ||
+ TryFrom<TransactionSignedEcRecovered> | ||
+ Into<TransactionSignedEcRecovered> | ||
{ | ||
/// Associated type representing the raw consensus variant of the transaction. | ||
type Consensus: From<Self> + TryInto<Self>; | ||
|
||
/// Associated type representing the recovered pooled variant of the transaction. | ||
type Pooled: Into<Self>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this makes sense as a low invasive step towards that feature, nice
@mattsse conflicts are fixed |
Related #8668