Skip to content

Commit

Permalink
Avoid building 2 auctions after restart
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinquaXD committed Mar 29, 2024
1 parent 2a6b916 commit 2c477ba
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions crates/autopilot/src/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,6 @@ pub async fn run(args: Arguments) {
let persistence =
infra::persistence::Persistence::new(args.s3.into().unwrap(), Arc::new(db.clone())).await;

let block = eth.current_block().borrow().number;
let solvable_orders_cache = SolvableOrdersCache::new(
args.min_order_validity_period,
persistence.clone(),
Expand All @@ -561,10 +560,6 @@ pub async fn run(args: Arguments) {
.expect("limit order price factor can't be converted to BigDecimal"),
domain::ProtocolFees::new(&args.fee_policies, args.fee_policy_max_partner_fee),
);
solvable_orders_cache
.update(block)
.await
.expect("failed to perform initial solvable orders update");

let liveness = Arc::new(Liveness::new(args.max_auction_age));
shared::metrics::serve_metrics(liveness.clone(), args.metrics_address);
Expand Down

0 comments on commit 2c477ba

Please sign in to comment.