-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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: make transaction type fields private #13915
base: main
Are you sure you want to change the base?
chore: make transaction type fields private #13915
Conversation
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.
good start, a few more things todo
let transaction_signed = Self::new(transaction, signature, hash); | ||
Ok(transaction_signed) |
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 didn't require a change
TransactionSigned::new_unhashed( | ||
tx.transaction().clone(), | ||
*tx.signature(), |
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 looks odd, why does this require a conversion at all,
in any case we need decomposition fns like
reth/crates/primitives-traits/src/block/mod.rs
Lines 99 to 100 in cd44fc3
/// Splits the block into its header and body. | |
fn split(self) -> (Self::Header, Self::Body); |
@@ -913,7 +913,7 @@ impl TryFrom<Recovered<TransactionSigned>> for MockTransaction { | |||
let size = transaction.size(); | |||
|
|||
#[allow(unreachable_patterns)] | |||
match transaction.transaction { | |||
match transaction.transaction() { |
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.
we also want fn into_transaction
then these changes aren't necessary
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.
so should I change this one
pub const fn transaction(&self) -> &Transaction {
&self.transaction
}
with this one?
pub fn into_transaction(self) -> Transaction {
self.transaction
}
towards #13913