mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-04-30 03:01:58 -04:00
refactor: remove duplicate RPC namespaces from arguments (#4418)
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
This commit is contained in:
@@ -550,6 +550,25 @@ mod tests {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_unique_rpc_modules() {
|
||||
let args = CommandParser::<RpcServerArgs>::parse_from([
|
||||
"reth",
|
||||
"--http.api",
|
||||
" eth, admin, debug, eth,admin",
|
||||
"--http",
|
||||
"--ws",
|
||||
])
|
||||
.args;
|
||||
let config = args.transport_rpc_module_config();
|
||||
let expected = vec![RethRpcModule::Eth, RethRpcModule::Admin, RethRpcModule::Debug];
|
||||
assert_eq!(config.http().cloned().unwrap().into_selection(), expected);
|
||||
assert_eq!(
|
||||
config.ws().cloned().unwrap().into_selection(),
|
||||
RpcModuleSelection::standard_modules()
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_rpc_server_config() {
|
||||
let args = CommandParser::<RpcServerArgs>::parse_from([
|
||||
|
||||
Reference in New Issue
Block a user