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

refactor: Only load federation clients when gateway boots #4026

Merged
merged 3 commits into from
Jan 19, 2024

Conversation

m1sterc001guy
Copy link
Contributor

See #3781 (comment) for context.

  • Removes DatabaseSource
  • Adds check when connecting a federation if the federation has already been connected
  • Wraps every usage of lnrpc behind a wrapper function that first checks if the lightning node is connected to the gateway.

Copy link

codecov bot commented Jan 11, 2024

Codecov Report

Attention: 48 lines in your changes are missing coverage. Please review.

Comparison is base (9c36777) 58.28% compared to head (e52d9ee) 58.38%.

Files Patch % Lines
gateway/ln-gateway/src/lib.rs 65.59% 32 Missing ⚠️
gateway/ln-gateway/src/state_machine/pay.rs 85.71% 6 Missing ⚠️
gateway/ln-gateway/src/state_machine/complete.rs 85.18% 4 Missing ⚠️
fedimint-cli/src/lib.rs 0.00% 1 Missing ⚠️
fedimint-client/src/lib.rs 87.50% 1 Missing ⚠️
fedimint-load-test-tool/src/common.rs 0.00% 1 Missing ⚠️
fedimint-wasm-tests/src/lib.rs 0.00% 1 Missing ⚠️
gateway/ln-gateway/src/client.rs 90.90% 1 Missing ⚠️
gateway/ln-gateway/src/state_machine/mod.rs 91.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4026      +/-   ##
==========================================
+ Coverage   58.28%   58.38%   +0.09%     
==========================================
  Files         193      193              
  Lines       42580    42552      -28     
==========================================
+ Hits        24819    24842      +23     
+ Misses      17761    17710      -51     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@m1sterc001guy m1sterc001guy force-pushed the load_clients branch 3 times, most recently from 7b71ee8 to 1588620 Compare January 11, 2024 03:58
@m1sterc001guy m1sterc001guy marked this pull request as ready for review January 11, 2024 04:17
@m1sterc001guy m1sterc001guy requested review from a team as code owners January 11, 2024 04:17
Copy link
Contributor

@dpc dpc left a comment

Choose a reason for hiding this comment

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

LGTM, but someone that understands lngateway should look.

okjodom
okjodom previously approved these changes Jan 11, 2024
Copy link
Contributor

@okjodom okjodom left a comment

Choose a reason for hiding this comment

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

reviewed and tested 1588620 looks good to me

@dpc dpc enabled auto-merge January 11, 2024 19:21
gateway/ln-gateway/src/lib.rs Outdated Show resolved Hide resolved
gateway/ln-gateway/src/lib.rs Outdated Show resolved Hide resolved
gateway/ln-gateway/src/lib.rs Outdated Show resolved Hide resolved
okjodom
okjodom previously approved these changes Jan 18, 2024
elsirion
elsirion previously approved these changes Jan 19, 2024
Copy link
Contributor

@douglaz douglaz left a comment

Choose a reason for hiding this comment

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

LGTM

@dpc dpc added this pull request to the merge queue Jan 19, 2024
Merged via the queue into fedimint:master with commit d6f1ab8 Jan 19, 2024
20 checks passed
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.

None yet

5 participants