diff --git a/fullnode/src/main.rs b/fullnode/src/main.rs index ad5ead6486..f84e38c7ee 100644 --- a/fullnode/src/main.rs +++ b/fullnode/src/main.rs @@ -163,6 +163,12 @@ fn main() { .takes_value(true) .help("RPC port to use for this node"), ) + .arg( + Arg::with_name("enable_rpc_exit") + .long("enable-rpc-exit") + .takes_value(false) + .help("Enable the JSON RPC 'fullnodeExit' API. Only enable in a debug environment"), + ) .arg( Arg::with_name("signer") .short("s") @@ -210,6 +216,10 @@ fn main() { fullnode_config.voting_disabled = no_signer; let use_only_bootstrap_leader = matches.is_present("no_leader_rotation"); + if matches.is_present("enable_rpc_exit") { + fullnode_config.rpc_config = solana::rpc::JsonRpcConfig::TestOnlyAllowRpcFullnodeExit; + } + let gossip_addr = { let mut addr = solana_netutil::parse_port_or_addr( matches.value_of("gossip_port"),