Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
scx1332 committed Nov 17, 2023
1 parent 0994733 commit 8d3ef0d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/erc20_rpc_pool/src/rpc_pool/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ impl Web3RpcEndpoint {
+ self.web3_rpc_info.penalty_from_head_behind as f64
+ self.web3_rpc_info.penalty_from_errors as f64;

let negative_score_exp = (-negative_score / 500.0).exp();
let negative_score_exp = (-negative_score / 2000.0).exp();
//negative_score_exp should be in 0 to 1 range
negative_score_exp * 75.0 + self.web3_rpc_info.bonus_from_last_chosen as f64
}
Expand All @@ -37,7 +37,7 @@ impl Web3RpcEndpoint {
}
let negative_score = self.web3_rpc_info.penalty_from_ms as f64
+ self.web3_rpc_info.penalty_from_head_behind as f64;
let negative_score_exp = (-negative_score / 500.0).exp();
let negative_score_exp = (-negative_score / 2000.0).exp();

negative_score_exp * 100.0
}
Expand Down

0 comments on commit 8d3ef0d

Please sign in to comment.