-
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
refactor: Remove standalone from_recovered functions and make part of TransactionCompat trait #13653
refactor: Remove standalone from_recovered functions and make part of TransactionCompat trait #13653
Conversation
@@ -45,6 +36,9 @@ pub trait TransactionCompat<T = TransactionSigned>: | |||
/// RPC transaction error type. | |||
type Error: error::Error + Into<jsonrpsee_types::ErrorObject<'static>>; | |||
|
|||
/// Wrapper for `fill()` with default `TransactionInfo` | |||
fn fill_pending(&self, tx: RecoveredTx<T>) -> Result<Self::Transaction, Self::Error>; |
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.
does implementing it here as default shared behavior is bad idea?
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 can impl this as default delegating to fill with default::default for the info type like before
&self, | ||
tx: RecoveredTx<OpTransactionSigned>, | ||
) -> Result<Self::Transaction, Self::Error> { | ||
self.fill(tx, TransactionInfo::default()) |
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.
yep like this
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.
great!
we can do the same for from_recovered_with_block_context
which is just fill(info)
How to run CI, because test with fees is failing, but they are not related to changes so i guess something wrong with my setup
|
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.
lgtm, the failing test looks like some feature related thing
Closes #13641