-
Notifications
You must be signed in to change notification settings - Fork 451
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
Fix minor comments from Timeboost PR #2787
Fix minor comments from Timeboost PR #2787
Conversation
Co-authored-by: Ganesh Vanahalli <[email protected]>
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
@@ -231,10 +231,21 @@ func Test_expressLaneService_validateExpressLaneTx(t *testing.T) { | |||
} | |||
} | |||
|
|||
type stubPublisher struct { |
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.
not critical:
seems easier to have the stubPublisher hold array of txs and have a publishTransaction function that appends to it. Some tests could use the array, some could use just it's length and some could ignore it completley.
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.
Refactored it along those lines.
@@ -31,9 +31,14 @@ type expressLaneControl struct { | |||
controller common.Address | |||
} | |||
|
|||
type transactionPublisher interface { | |||
publishTransactionImpl(context.Context, *types.Transaction, *arbitrum_types.ConditionalOptions, bool) 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.
- an interface with private function can get weird if we want to move code around.
- an interface should make sense as itself and func-names should self-document
- I think you only ever pass "true" in that bool, is that right?
Mybe have something like "PublishFastLaneTransaction" or similar that doesn't accept the bool and is trivially implemented in the sequencer or a wrapper?
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.
Refactored it along those lines.
…res-lane-timeboost-fix-pr-comments
…ments' into expres-lane-timeboost-fix-pr-comments
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
This PR fixes some of the minor issues identified in #2561. This is being submitted as a separate PR for easier review separate from Raul and Terence's work.