add block-sub argument to solana-test-validator (#31544)
add block sub to test validator
This commit is contained in:
parent
3845423e17
commit
312d31acaa
|
@ -154,6 +154,7 @@ fn main() {
|
||||||
|
|
||||||
let rpc_port = value_t_or_exit!(matches, "rpc_port", u16);
|
let rpc_port = value_t_or_exit!(matches, "rpc_port", u16);
|
||||||
let enable_vote_subscription = matches.is_present("rpc_pubsub_enable_vote_subscription");
|
let enable_vote_subscription = matches.is_present("rpc_pubsub_enable_vote_subscription");
|
||||||
|
let enable_block_subscription = matches.is_present("rpc_pubsub_enable_block_subscription");
|
||||||
let faucet_port = value_t_or_exit!(matches, "faucet_port", u16);
|
let faucet_port = value_t_or_exit!(matches, "faucet_port", u16);
|
||||||
let ticks_per_slot = value_t!(matches, "ticks_per_slot", u64).ok();
|
let ticks_per_slot = value_t!(matches, "ticks_per_slot", u64).ok();
|
||||||
let slots_per_epoch = value_t!(matches, "slots_per_epoch", Slot).ok();
|
let slots_per_epoch = value_t!(matches, "slots_per_epoch", Slot).ok();
|
||||||
|
@ -440,6 +441,7 @@ fn main() {
|
||||||
)
|
)
|
||||||
.pubsub_config(PubSubConfig {
|
.pubsub_config(PubSubConfig {
|
||||||
enable_vote_subscription,
|
enable_vote_subscription,
|
||||||
|
enable_block_subscription,
|
||||||
..PubSubConfig::default()
|
..PubSubConfig::default()
|
||||||
})
|
})
|
||||||
.rpc_port(rpc_port)
|
.rpc_port(rpc_port)
|
||||||
|
|
|
@ -2147,6 +2147,12 @@ pub fn test_app<'a>(version: &'a str, default_args: &'a DefaultTestArgs) -> App<
|
||||||
.takes_value(false)
|
.takes_value(false)
|
||||||
.help("Enable the unstable RPC PubSub `voteSubscribe` subscription"),
|
.help("Enable the unstable RPC PubSub `voteSubscribe` subscription"),
|
||||||
)
|
)
|
||||||
|
.arg(
|
||||||
|
Arg::with_name("rpc_pubsub_enable_block_subscription")
|
||||||
|
.long("rpc-pubsub-enable-block-subscription")
|
||||||
|
.takes_value(false)
|
||||||
|
.help("Enable the unstable RPC PubSub `blockSubscribe` subscription"),
|
||||||
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("bpf_program")
|
Arg::with_name("bpf_program")
|
||||||
.long("bpf-program")
|
.long("bpf-program")
|
||||||
|
|
Loading…
Reference in New Issue