add block-sub argument to solana-test-validator (#31544)

add block sub to test validator
This commit is contained in:
x19 2023-05-09 11:29:14 -04:00 committed by GitHub
parent 3845423e17
commit 312d31acaa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 0 deletions

View File

@ -154,6 +154,7 @@ fn main() {
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_block_subscription = matches.is_present("rpc_pubsub_enable_block_subscription");
let faucet_port = value_t_or_exit!(matches, "faucet_port", u16);
let ticks_per_slot = value_t!(matches, "ticks_per_slot", u64).ok();
let slots_per_epoch = value_t!(matches, "slots_per_epoch", Slot).ok();
@ -440,6 +441,7 @@ fn main() {
)
.pubsub_config(PubSubConfig {
enable_vote_subscription,
enable_block_subscription,
..PubSubConfig::default()
})
.rpc_port(rpc_port)

View File

@ -2147,6 +2147,12 @@ pub fn test_app<'a>(version: &'a str, default_args: &'a DefaultTestArgs) -> App<
.takes_value(false)
.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::with_name("bpf_program")
.long("bpf-program")