From ec43d694620a493a313309414c959f6f83eef7b9 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 4 Jan 2023 14:33:39 -0800 Subject: [PATCH] fake weight for now --- web3_proxy/src/rpcs/connection.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/web3_proxy/src/rpcs/connection.rs b/web3_proxy/src/rpcs/connection.rs index 64ab933f..ce9c558a 100644 --- a/web3_proxy/src/rpcs/connection.rs +++ b/web3_proxy/src/rpcs/connection.rs @@ -1135,7 +1135,10 @@ impl Serialize for Web3Connection { } state.serialize_field("tier", &self.tier)?; - state.serialize_field("weight", &1.0)?; + + let faked_weight = 100u64.saturating_sub(self.tier) as f64 / 100.0; + + state.serialize_field("weight", &faked_weight)?; state.serialize_field("soft_limit", &self.soft_limit)?;