Bugfix/block subscribe (#22516)

* use correct operation name

* require enable_rpc_transaction_history flag when enabling block_subscription

Co-authored-by: Zano <segfaultdoctor@protonmail.com>
This commit is contained in:
segfaultdoctor 2022-01-14 21:53:34 -05:00 committed by GitHub
parent 70633b5c2f
commit 7171b3a3ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 1 deletions

View File

@ -305,7 +305,7 @@ impl PubsubClient {
let result = PubsubClientSubscription {
message_type: PhantomData,
operation: "blocks",
operation: "block",
socket,
subscription_id,
t_cleanup: Some(t_cleanup),

View File

@ -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

View File

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