From 4959aa2cc5be20f36cc41d0486b95ff358d7b667 Mon Sep 17 00:00:00 2001 From: scx1332 Date: Wed, 15 Nov 2023 00:08:37 +0100 Subject: [PATCH] change scoring --- crates/erc20_rpc_pool/src/rpc_pool/pool.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/crates/erc20_rpc_pool/src/rpc_pool/pool.rs b/crates/erc20_rpc_pool/src/rpc_pool/pool.rs index f90102b1..43031759 100644 --- a/crates/erc20_rpc_pool/src/rpc_pool/pool.rs +++ b/crates/erc20_rpc_pool/src/rpc_pool/pool.rs @@ -19,14 +19,14 @@ pub struct Web3RpcEndpoint { impl Web3RpcEndpoint { pub fn get_score(&self) -> i64 { - self.web3_rpc_info.penalty_from_last_critical_error - + self.web3_rpc_info.penalty_from_ms - + self.web3_rpc_info.penalty_from_head_behind + 100 - self.web3_rpc_info.penalty_from_last_critical_error + - self.web3_rpc_info.penalty_from_ms + - self.web3_rpc_info.penalty_from_head_behind + self.web3_rpc_info.bonus_from_last_chosen - + self.web3_rpc_info.penalty_from_errors + - self.web3_rpc_info.penalty_from_errors } pub fn get_validation_score(&self) -> i64 { - self.web3_rpc_info.penalty_from_ms + self.web3_rpc_info.penalty_from_head_behind + 100 - self.web3_rpc_info.penalty_from_ms - self.web3_rpc_info.penalty_from_head_behind } }