Add flag to enable the JSON RPC fullnodeExit API

This commit is contained in:
Michael Vines 2019-03-04 15:01:48 -08:00
parent 51502537b1
commit 9ce2bc94bf
1 changed files with 10 additions and 0 deletions

View File

@ -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"),