diff --git a/crates/rpc-client/src/call.rs b/crates/rpc-client/src/call.rs index 327a473fe00..f00005c5d15 100644 --- a/crates/rpc-client/src/call.rs +++ b/crates/rpc-client/src/call.rs @@ -192,23 +192,28 @@ where Self { state: CallState::Prepared { request: Some(req), connection }, _pd: PhantomData } } - /// Set the request to be a non-standard subscription (i.e. not - /// "eth_subscribe"). + /// Returns `true` if the request is a subscription. /// /// # Panics /// /// Panics if called after the request has been sent. - pub fn set_is_subscription(&mut self) { - self.request_mut().meta.set_is_subscription(); + pub fn is_subscription(&self) -> bool { + self.request().meta.is_subscription() } - /// Returns `true` if the request is a subscription. + /// Set the request to be a non-standard subscription (i.e. not + /// "eth_subscribe"). /// /// # Panics /// /// Panics if called after the request has been sent. - pub fn is_subscription(&self) -> bool { - self.request().meta.is_subscription() + pub fn set_is_subscription(&mut self) { + self.request_mut().meta.set_is_subscription(); + } + + /// Set the subscription status of the request. + pub fn set_subscription_status(&mut self, status: bool) { + self.request_mut().meta.set_subscription_status(status); } /// Get a mutable reference to the params of the request.