Skip to content

Commit

Permalink
Remove the node_testnet_rewards_program_ownership_proof command
Browse files Browse the repository at this point in the history
  • Loading branch information
Leo-Besancon committed Nov 15, 2024
1 parent 6995a96 commit 3ea734b
Showing 1 changed file with 0 additions and 40 deletions.
40 changes: 0 additions & 40 deletions massa-client/src/cmds.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,6 @@ pub enum Command {
)]
node_stop_staking,

#[strum(
ascii_case_insensitive,
props(args = "Address discord_id"),
message = "generate the testnet rewards program node/staker ownership proof"
)]
node_testnet_rewards_program_ownership_proof,

#[strum(
ascii_case_insensitive,
props(args = "(add, remove or allow-all) [IpAddr]", pwd_not_needed = "true"),
Expand Down Expand Up @@ -531,39 +524,6 @@ impl Command {
}
}

Command::node_testnet_rewards_program_ownership_proof => {
let wallet = wallet_opt.as_mut().unwrap();

if parameters.len() != 2 {
bail!("wrong number of parameters");
}
// parse
let addr = parameters[0].parse::<Address>()?;
let msg = parameters[1].as_bytes().to_vec();
// get address signature
if let Some(addr_sig) = wallet.sign_message(&addr, msg.clone()) {
// get node signature
match client.private.node_sign_message(msg).await {
// print concatenation
Ok(node_sig) => {
if !json {
println!("Enter the following in discord:");
}
Ok(Box::new(format!(
"{}/{}/{}/{}",
node_sig.public_key,
node_sig.signature,
addr_sig.public_key,
addr_sig.signature
)))
}
Err(e) => rpc_error!(e),
}
} else {
bail!("address not found")
}
}

Command::get_status => match client.public.get_status().await {
Ok(node_status) => Ok(Box::new(node_status)),
Err(e) => rpc_error!(e),
Expand Down

0 comments on commit 3ea734b

Please sign in to comment.