-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
chore(sdk): impl SignedTransaction
for TransactionSigned
#12187
Conversation
signature: Signature, | ||
) -> Self { | ||
Self::from_transaction_and_signature(transaction, signature) | ||
fn from_transaction_and_signature(transaction: Transaction, signature: Signature) -> 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.
should we add some version of this with hash? recalculating the hash seems wasteful. i took a peek at the codebase and it seems like we do this even when the type already has an hash . eg
impl TryFrom<WithOtherFields<alloy_rpc_types::Transaction>> for TransactionSigned {
or adding a maybe_tx_hash() -> Option<TxHash>
to the trait, that can be checked here
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.
definitely! nice find, think it doesn't fit in scope of this refactor pr though, please open a perf issue for this
Closes #12169
Implements
SignedTransaction
forTransactionSigned
, treatingTransactionSigned
as an l1 type only