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

improvement: move sealing to init function #1348

Merged

Conversation

vgonkivs
Copy link
Member

@vgonkivs vgonkivs commented Feb 7, 2023

Overview

Closes #1331

Checklist

  • New and updated code has appropriate documentation
  • New and updated code has new and/or updated testing
  • Required CI checks are passing
  • Visual proof for any user facing features like CLI or documentation updates
  • Linked issues closed with keywords

@vgonkivs vgonkivs self-assigned this Feb 7, 2023
@vgonkivs vgonkivs force-pushed the perform_sealing_in_init_function branch from e334dd7 to 41aa057 Compare February 7, 2023 11:39
@vgonkivs vgonkivs marked this pull request as ready for review February 7, 2023 13:51
@vgonkivs vgonkivs marked this pull request as draft February 7, 2023 13:54
@codecov-commenter
Copy link

codecov-commenter commented Feb 7, 2023

Codecov Report

Merging #1348 (6b742e5) into main (85d9e16) will increase coverage by 0.07%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1348      +/-   ##
==========================================
+ Coverage   48.28%   48.35%   +0.07%     
==========================================
  Files          78       79       +1     
  Lines        4422     4428       +6     
==========================================
+ Hits         2135     2141       +6     
  Misses       2107     2107              
  Partials      180      180              
Impacted Files Coverage Δ
app/config.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@vgonkivs vgonkivs marked this pull request as ready for review February 7, 2023 16:20
evan-forbes
evan-forbes previously approved these changes Feb 7, 2023
Copy link
Member

@evan-forbes evan-forbes left a comment

Choose a reason for hiding this comment

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

dope! thanks for taking the time to put into the app pkg 🙂

rootulp
rootulp previously approved these changes Feb 7, 2023
sdk "github.com/cosmos/cosmos-sdk/types"
)

func init() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

[for reviewers] init() is called once regardless of how many times this package is imported per https://tutorialedge.net/golang/the-go-init-function/

IMO this seems less clear than an explicit New() or NewConfig() invocation but maybe that's because I haven't seen it before. If it's clearer for celestia-node then :shipit:

@vgonkivs vgonkivs dismissed stale reviews from rootulp and evan-forbes via 6b742e5 February 8, 2023 09:09
@vgonkivs vgonkivs force-pushed the perform_sealing_in_init_function branch from d812c12 to 6b742e5 Compare February 8, 2023 09:09
@MSevey MSevey requested review from a team and rahulghangas and removed request for a team February 8, 2023 09:09
@evan-forbes evan-forbes merged commit fd63822 into celestiaorg:main Feb 8, 2023
evan-forbes pushed a commit that referenced this pull request Feb 27, 2023
## Overview
Closes #1331

## Checklist

<!-- 
Please complete the checklist to ensure that the PR is ready to be
reviewed.

IMPORTANT:
PRs should be left in Draft until the below checklist is completed.
-->

- [x] New and updated code has appropriate documentation
- [x] New and updated code has new and/or updated testing
- [x] Required CI checks are passing
- [x] Visual proof for any user facing features like CLI or
documentation updates
- [x] Linked issues closed with keywords
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.

Seal global cosmos config outside of the cli
4 participants