Add flag to enable the JSON RPC fullnodeExit API
This commit is contained in:
@ -163,6 +163,12 @@ fn main() {
|
|||||||
.takes_value(true)
|
.takes_value(true)
|
||||||
.help("RPC port to use for this node"),
|
.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(
|
||||||
Arg::with_name("signer")
|
Arg::with_name("signer")
|
||||||
.short("s")
|
.short("s")
|
||||||
@ -210,6 +216,10 @@ fn main() {
|
|||||||
fullnode_config.voting_disabled = no_signer;
|
fullnode_config.voting_disabled = no_signer;
|
||||||
let use_only_bootstrap_leader = matches.is_present("no_leader_rotation");
|
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 gossip_addr = {
|
||||||
let mut addr = solana_netutil::parse_port_or_addr(
|
let mut addr = solana_netutil::parse_port_or_addr(
|
||||||
matches.value_of("gossip_port"),
|
matches.value_of("gossip_port"),
|
||||||
|
Reference in New Issue
Block a user