Skip to content

Commit

Permalink
Fix clippy deprecated warning + feature issues (#345)
Browse files Browse the repository at this point in the history
  • Loading branch information
drewstone authored Dec 13, 2023
1 parent 678510d commit d71eae1
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 22 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ sc-chain-spec = { workspace = true }
sc-consensus-manual-seal = { workspace = true }
sc-rpc = { workspace = true }
sc-rpc-api = { workspace = true }
sp-application-crypto = { workspace = true }
sp-api = { workspace = true }
sp-block-builder = { workspace = true }
sp-blockchain = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion node/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub struct Cli {

#[cfg(feature = "relayer")]
#[clap(flatten)]
pub relayer_cmd: webb_relayer_gadget_cli::WebbRelayerCmd,
pub relayer_cmd: tangle_relayer_gadget_cli::RelayerCmd,

#[cfg(feature = "light-client")]
#[clap(flatten)]
Expand Down
41 changes: 22 additions & 19 deletions node/src/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ pub struct RunFullParams {
pub rpc_config: RpcConfig,
pub debug_output: Option<std::path::PathBuf>,
#[cfg(feature = "relayer")]
pub relayer_cmd: webb_relayer_gadget_cli::WebbRelayerCmd,
pub relayer_cmd: tangle_relayer_gadget_cli::RelayerCmd,
#[cfg(feature = "light-client")]
pub light_client_relayer_cmd:
pallet_eth2_light_client_relayer_gadget_cli::LightClientRelayerCmd,
Expand Down Expand Up @@ -550,7 +550,7 @@ pub async fn new_full(
if role.is_authority() {
// setup relayer gadget params
#[cfg(feature = "relayer")]
let relayer_params = webb_relayer_gadget::WebbRelayerParams {
let relayer_params = tangle_relayer_gadget::RelayerParams {
local_keystore: keystore_container.local_keystore(),
config_dir: relayer_cmd.relayer_config_dir,
database_path: config
Expand All @@ -566,26 +566,29 @@ pub async fn new_full(
task_manager.spawn_handle().spawn(
"relayer-gadget",
None,
webb_relayer_gadget::start_relayer_gadget(relayer_params),
tangle_relayer_gadget::start_relayer_gadget(
relayer_params,
sp_application_crypto::KeyTypeId(*b"role"),
),
);

// Start Eth2 Light client Relayer Gadget - (MAINNET RELAYER)
// #[cfg(feature = "light-client")]
// task_manager.spawn_handle().spawn(
// "mainnet-relayer-gadget",
// None,
// pallet_eth2_light_client_relayer_gadget::start_gadget(
// pallet_eth2_light_client_relayer_gadget::Eth2LightClientParams {
// lc_relay_config_path: light_client_relayer_cmd
// .light_client_relay_config_path
// .clone(),
// lc_init_config_path: light_client_relayer_cmd
// .light_client_init_pallet_config_path
// .clone(),
// eth2_chain_id: webb_proposals::TypedChainId::Evm(1),
// },
// ),
// );
#[cfg(feature = "light-client")]
task_manager.spawn_handle().spawn(
"mainnet-relayer-gadget",
None,
pallet_eth2_light_client_relayer_gadget::start_gadget(
pallet_eth2_light_client_relayer_gadget::Eth2LightClientParams {
lc_relay_config_path: light_client_relayer_cmd
.light_client_relay_config_path
.clone(),
lc_init_config_path: light_client_relayer_cmd
.light_client_init_pallet_config_path
.clone(),
eth2_chain_id: webb_proposals::TypedChainId::Evm(1),
},
),
);
}
let params = sc_service::SpawnTasksParams {
network: network.clone(),
Expand Down
4 changes: 2 additions & 2 deletions relayer-gadget/cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use std::path::PathBuf;

/// Cli tool to interact with Webb Relayer CLI
#[derive(Debug, Clone, clap::Parser)]
#[clap(next_help_heading = "Webb Relayer")]
pub struct WebbRelayerCmd {
#[command(next_help_heading = "Webb Relayer")]
pub struct RelayerCmd {
/// Directory that contains configration files for the relayer.
#[arg(long, value_name = "PATH")]
pub relayer_config_dir: Option<PathBuf>,
Expand Down

0 comments on commit d71eae1

Please sign in to comment.