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

Fix minor comments from Timeboost PR #2787

Merged

Conversation

Tristan-Wilson
Copy link
Member

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.

@cla-bot cla-bot bot added the s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA. label Nov 13, 2024
@Tristan-Wilson Tristan-Wilson marked this pull request as ready for review November 13, 2024 13:36
Co-authored-by: Ganesh Vanahalli <[email protected]>
Copy link
Contributor

@ganeshvanahalli ganeshvanahalli left a 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 {
Copy link
Contributor

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.

Copy link
Member Author

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
Copy link
Contributor

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?

Copy link
Member Author

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.

Base automatically changed from express-lane-timeboost-input-validation to express-lane-timeboost November 20, 2024 19:23
Copy link
Contributor

@tsahee tsahee left a comment

Choose a reason for hiding this comment

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

LGTM

@Tristan-Wilson Tristan-Wilson merged commit cee611d into express-lane-timeboost Nov 21, 2024
3 of 8 checks passed
@Tristan-Wilson Tristan-Wilson deleted the expres-lane-timeboost-fix-pr-comments branch November 21, 2024 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
s Automatically added by the CLA bot if the creator of a PR is registered as having signed the CLA.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants