From 95045ec78ef77e39d1fbcb28e9fd9a97c396df12 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Thu, 22 Dec 2022 12:05:15 -0800 Subject: [PATCH] block eth_subscribe and eth_unsubscribe over http --- web3_proxy/src/app/mod.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/web3_proxy/src/app/mod.rs b/web3_proxy/src/app/mod.rs index 78f258c9..ab8377cf 100644 --- a/web3_proxy/src/app/mod.rs +++ b/web3_proxy/src/app/mod.rs @@ -1007,6 +1007,16 @@ impl Web3ProxyApp { // TODO: return a real response if all backends are syncing or if no servers in sync json!(false) } + "eth_subscribe" => { + return Err(anyhow::anyhow!( + "notifications not supported. eth_subscribe is only available over a websocket" + )); + } + "eth_unsubscribe" => { + return Err(anyhow::anyhow!( + "notifications not supported. eth_unsubscribe is only available over a websocket" + )); + } "net_listening" => { // no stats on this. its cheap // TODO: only if there are some backends on balanced_rpcs?