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
Conversation
This is a step toward modularization, where configs (and anything else about modules) is injected from the outside.
dea9216
to
4e37d8b
Compare
@@ -257,20 +275,31 @@ impl ServerConfig { | |||
bail!("Peer ids are not indexed from 0"); | |||
} | |||
|
|||
self.get_module_config::<WalletConfig>("wallet")? |
There was a problem hiding this comment.
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![ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Win.
@jkitman Please let me know if looks OK. |
I have confirmed this made add in the social recovery module much easier. @elsirion |
There was a problem hiding this 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 😅
Nice, good to get rid of those! |
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.