Skip to content

Conversation

@KnowWhoami
Copy link

Description:

This PR introduces several improvements and refactors which are :

  • Modify Config for each components:

    • Fix various possible bugs related to config of each component.
    • Refactor several api's used to parse the config contents and removed other unnecessary ones.
  • Improved File Handling:

    • Replaced the OpenOptions builder with the more straightforward File associated APIs wherever possible in order to simplify file handling code.
  • Removed the read_connection_network_string API.

  • We can directly use ConnectionType::from_str instead.

 Instead use `ConnectionType::fromstr` for it.
- Currently `OpenOptions` builder  is used to deal with file in different scenarios for which `File` implementation already contains api's for that.
Hence replaced `OpenOptions` builder code with those api wherever possible.
 It aims to:
 * Refactor several api's used to parse the config contents and removed other unnecessary ones.
 * Removes config section in `config.toml` of each component.
 * Solves multiple bugs related to configs.
@codecov
Copy link

codecov bot commented Nov 30, 2024

Codecov Report

Attention: Patch coverage is 97.18310% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.28%. Comparing base (47e1b44) to head (fcc55df).
Report is 28 commits behind head on master.

Files with missing lines Patch % Lines
src/bin/directoryd.rs 0.00% 1 Missing ⚠️
src/bin/makerd.rs 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #315      +/-   ##
==========================================
- Coverage   79.45%   78.28%   -1.18%     
==========================================
  Files          32       32              
  Lines        4834     4831       -3     
==========================================
- Hits         3841     3782      -59     
- Misses        993     1049      +56     

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

Copy link

@mojoX911 mojoX911 left a comment

Choose a reason for hiding this comment

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

Ack. Good cleanup changes.

@mojoX911
Copy link

mojoX911 commented Dec 2, 2024

Okay to do it later. TODO is good for now. Merging.

@mojoX911 mojoX911 merged commit 9977fdb into citadel-tech:master Dec 2, 2024
14 checks passed
@KnowWhoami KnowWhoami deleted the config_bug branch December 23, 2024 13:43
bicodrex pushed a commit to bicodrex/coinswap that referenced this pull request Jul 21, 2025
Refactor `Config` and fix related bugs
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.

2 participants