Skip to content

Commit

Permalink
Bugfix/block subscribe (#22516)
Browse files Browse the repository at this point in the history
* use correct operation name

* require enable_rpc_transaction_history flag when enabling block_subscription

Co-authored-by: Zano <segfaultdoctor@protonmail.com>
  • Loading branch information
segfaultdoc and Zano committed Jan 15, 2022
1 parent 70633b5 commit 7171b3a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/pubsub_client.rs
Expand Up @@ -305,7 +305,7 @@ impl PubsubClient {

let result = PubsubClientSubscription {
message_type: PhantomData,
operation: "blocks",
operation: "block",
socket,
subscription_id,
t_cleanup: Some(t_cleanup),
Expand Down
3 changes: 3 additions & 0 deletions multinode-demo/bootstrap-validator.sh
Expand Up @@ -49,6 +49,9 @@ while [[ -n $1 ]]; do
elif [[ $1 = --enable-rpc-transaction-history ]]; then
args+=("$1")
shift
elif [[ $1 = --rpc-pubsub-enable-block-subscription ]]; then
args+=("$1")
shift
elif [[ $1 = --enable-cpi-and-log-storage ]]; then
args+=("$1")
shift
Expand Down
1 change: 1 addition & 0 deletions validator/src/main.rs
Expand Up @@ -1206,6 +1206,7 @@ pub fn main() {
.arg(
Arg::with_name("rpc_pubsub_enable_block_subscription")
.long("rpc-pubsub-enable-block-subscription")
.requires("enable_rpc_transaction_history")
.takes_value(false)
.help("Enable the unstable RPC PubSub `blockSubscribe` subscription"),
)
Expand Down

0 comments on commit 7171b3a

Please sign in to comment.