Skip to content

Commit

Permalink
Fix parsing score_cap (#2033)
Browse files Browse the repository at this point in the history
# Description
@fhenneke noticed that our `score_cap` is [parsed
wrongly](https://production-6de61f.kb.eu-central-1.aws.cloud.es.io/app/discover#/doc/c0e240e0-d9b3-11ed-b0e6-e361adffce0b/cowlogs-prod-2023.11.01?id=icFRiosBGP6wkTcjJhYX).

Value `1e16` is parsed as `18446744073709551616` due to
decimal/hexadecimal misconfiguration.
  • Loading branch information
sunce86 authored Nov 1, 2023
1 parent a45e25f commit dbf2eeb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion crates/autopilot/src/arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ pub struct Arguments {
pub additional_deadline_for_rewards: usize,

/// Cap used for CIP20 score calculation. Defaults to 0.01 ETH.
#[clap(long, env, default_value = "10000000000000000")]
#[clap(long, env, default_value = "0.01", value_parser = shared::arguments::wei_from_ether)]
pub score_cap: U256,

/// The amount of time that the autopilot waits looking for a settlement
Expand Down
2 changes: 1 addition & 1 deletion crates/solver/src/arguments.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ pub struct Arguments {
pub risk_params: risk_computation::Arguments,

/// Cap used for CIP20 score calculation. Defaults to 0.01 ETH.
#[clap(long, env, default_value = "10000000000000000")]
#[clap(long, env, default_value = "0.01", value_parser = shared::arguments::wei_from_ether)]
pub score_cap: U256,

/// Should we skip settlements with non-positive score for solver
Expand Down

0 comments on commit dbf2eeb

Please sign in to comment.