From 58312655b433fcecb53158309adc88b875719ad3 Mon Sep 17 00:00:00 2001 From: Justin Starry Date: Mon, 7 Sep 2020 18:31:25 +0800 Subject: [PATCH] Fix signature subscription panic (#12077) (#12092) --- core/src/rpc_subscriptions.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/src/rpc_subscriptions.rs b/core/src/rpc_subscriptions.rs index eda4b5fdaf..ae6c0555b9 100644 --- a/core/src/rpc_subscriptions.rs +++ b/core/src/rpc_subscriptions.rs @@ -634,7 +634,7 @@ impl RpcSubscriptions { ) { let (commitment, enable_received_notification) = signature_subscribe_config .map(|config| (config.commitment, config.enable_received_notification)) - .unwrap_or((None, Some(false))); + .unwrap_or_default(); let commitment_level = commitment .unwrap_or_else(CommitmentConfig::recent) @@ -970,9 +970,7 @@ impl RpcSubscriptions { }, ) in hashmap.iter() { - if is_received_notification_enabled - .expect("All signature subscriptions must have this config field set") - { + if is_received_notification_enabled.unwrap_or_default() { notifier.notify( Response { context: RpcResponseContext {