Skip to content

Commit

Permalink
chore: PRT - Update avalanche config example (#1834)
Browse files Browse the repository at this point in the history
* Update avalanche config example

* statistical failure

---------

Co-authored-by: Ran Mishael <[email protected]>
  • Loading branch information
shleikes and ranlavanet authored Dec 15, 2024
1 parent 5639e67 commit 00d0c46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion config/provider_examples/avalanch_internal_paths_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ endpoints:
network-address:
address: 127.0.0.1:2221
node-urls:
- url: ws://127.0.0.1:3333/C/rpc/ws
- url: ws://127.0.0.1:3333/C/ws
internal-path: "/C/rpc" # c chain like specified in the spec

- url: https://127.0.0.1:3334/C/rpc
internal-path: "/C/rpc" # c/rpc like specified in the spec
- url: https://127.0.0.1:3334/C/avax
internal-path: "/C/avax" # c/avax like specified in the spec
- url: https://127.0.0.1:3335/X
Expand Down
2 changes: 1 addition & 1 deletion protocol/provideroptimizer/provider_optimizer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ func TestProviderOptimizerAvailability(t *testing.T) {
time.Sleep(4 * time.Millisecond)
results, tierResults := runChooseManyTimesAndReturnResults(t, providerOptimizer, providersGen.providersAddresses, nil, requestCU, requestBlock, 1000)
require.Greater(t, tierResults[0], 300, tierResults) // 0.42 chance for top tier due to the algorithm to rebalance chances
require.Greater(t, results[providersGen.providersAddresses[skipIndex]]+results[providersGen.providersAddresses[skipIndex+1]]+results[providersGen.providersAddresses[skipIndex+2]], 280)
require.Greater(t, results[providersGen.providersAddresses[skipIndex]]+results[providersGen.providersAddresses[skipIndex+1]]+results[providersGen.providersAddresses[skipIndex+2]], 275)
require.InDelta(t, results[providersGen.providersAddresses[skipIndex]], results[providersGen.providersAddresses[skipIndex+1]], 50)
results, _ = runChooseManyTimesAndReturnResults(t, providerOptimizer, providersGen.providersAddresses, map[string]struct{}{providersGen.providersAddresses[skipIndex]: {}}, requestCU, requestBlock, 1000)
require.Zero(t, results[providersGen.providersAddresses[skipIndex]])
Expand Down

0 comments on commit 00d0c46

Please sign in to comment.