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

Batcher: simplify ChannelOut initialization #12045

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

mdehoog
Copy link
Contributor

@mdehoog mdehoog commented Sep 22, 2024

Description

Simplify the initialization of new derive.ChannelOut implementations in the batcher. Includes:

  • Removing genesisTimestamp and chainID from NewSpanChannelOut (they are instead exposed from the rollup.ChainSpec struct
  • Move ChannelOut selection to a separate function for clarity
  • Changed the rollup.Config variable to a reference in ChannelBuilder, to avoid the unnecessary referencing/dereferencing.

Tests

There are no logic changes, apart from the ChannelBuilder.rollupCfg, which should be covered by existing tests.

Additional context

Paving the way for customization of the derive.ChannelOut, which will come in a follow up.

Copy link

codecov bot commented Sep 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.87%. Comparing base (0543bf7) to head (e98b4ca).
Report is 3 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #12045      +/-   ##
===========================================
- Coverage    79.10%   78.87%   -0.24%     
===========================================
  Files           41       41              
  Lines         3437     3437              
===========================================
- Hits          2719     2711       -8     
- Misses         548      557       +9     
+ Partials       170      169       -1     
Flag Coverage Δ
cannon-go-tests 78.87% <ø> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 1 file with indirect coverage changes

@mdehoog mdehoog force-pushed the michael/channel-out-init branch 4 times, most recently from c921d6f to b9aec78 Compare September 22, 2024 05:41
@mdehoog mdehoog marked this pull request as ready for review September 22, 2024 18:07
@mdehoog mdehoog requested review from a team as code owners September 22, 2024 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant