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

Use FederationModuleConfigGen to manipulate module configs #1174

Merged
merged 3 commits into from Dec 31, 2022

Conversation

dpc
Copy link
Contributor

@dpc dpc commented Dec 29, 2022

Get rid of some hardcodings listing federation modules deep inside generic code, and move toward edges (final binaries), so it's easier to customize/inject new modules.

There's probably a lot more work to do around it, but it's a step towards the goal, I think.

This is a step toward modularization, where configs (and anything else
about modules) is injected from the outside.
@dpc dpc force-pushed the config-gen-fix branch 2 times, most recently from dea9216 to 4e37d8b Compare December 29, 2022 22:58
@@ -257,20 +275,31 @@ impl ServerConfig {
bail!("Peer ids are not indexed from 0");
}

self.get_module_config::<WalletConfig>("wallet")?
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Win

@@ -133,34 +133,37 @@ impl ServerConfigConsensus {
})
.collect();

let modules = vec![
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Win.

@dpc
Copy link
Contributor Author

dpc commented Dec 29, 2022

@jkitman Please let me know if looks OK.

@dpc
Copy link
Contributor Author

dpc commented Dec 30, 2022

I have confirmed this made add in the social recovery module much easier. @elsirion

Copy link
Contributor

@elsirion elsirion left a comment

Choose a reason for hiding this comment

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

Thx, I wanted to do pretty much the same before I got side-tracked by networking 😅

@elsirion elsirion merged commit 99e5b50 into fedimint:master Dec 31, 2022
@dpc dpc deleted the config-gen-fix branch December 31, 2022 17:32
@jkitman
Copy link
Contributor

jkitman commented Jan 2, 2023

Nice, good to get rid of those!

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

3 participants