Skip to content
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

refactor: rename TransactionSignedEcRecovered to RecoveredTx #13074

Merged
merged 3 commits into from
Dec 3, 2024

Conversation

klkvr
Copy link
Collaborator

@klkvr klkvr commented Dec 2, 2024

This will mostly be used with transaction generic so long type name isn't useful.

I've also made PooledTransactionsElementEcRecovered to just be a type alias for RecoveredTx<PooledTransactionsElement>:

/// A signed pooled transaction with recovered signer.
pub type PooledTransactionsElementEcRecovered<T = PooledTransactionsElement> = RecoveredTx<T>;

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

smol nit

this is better, and we definitely need this otherwise we'd need to introduce associated types for the recovered tx variant which is a bit stupid

pending @Rjected

pub const fn signer(&self) -> Address {
self.signer
}
pub type PooledTransactionsElementEcRecovered<T = PooledTransactionsElement> = RecoveredTx<T>;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we also keep an alias for the TransactionSignedEcRecovered but mark it as deprecated, because I assume some people are using this type via reth-primitives

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah we should probably do that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also maybe we could rename PooledTransactionsElementEcRecovered to RecoveredPooledTx?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also maybe we could rename PooledTransactionsElementEcRecovered to RecoveredPooledTx?

I think ideally we just use RecoveredTx<PoolTx::Pooled>? the current PooledTransactionsElementEcRecovered is already not used much

Copy link
Member

@Rjected Rjected left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agree that we should add an alias because TransactionSignedEcRecovered is likely to be used by primitives consumers, also have a naming suggestion

Copy link
Collaborator

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, pending alias

@klkvr klkvr enabled auto-merge December 2, 2024 21:49
@klkvr klkvr added this pull request to the merge queue Dec 2, 2024
Merged via the queue into main with commit 9ed9fa2 Dec 3, 2024
41 checks passed
@klkvr klkvr deleted the klkvr/rename-recovered branch December 3, 2024 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants