From 0b7e62e671db8aa616c162f419add7934c4532c4 Mon Sep 17 00:00:00 2001 From: Serge Farny Date: Mon, 1 Apr 2024 10:30:49 +0200 Subject: [PATCH] liquidator: do not panic if token or perp rebalancing fails (#927) --- bin/liquidator/src/rebalance.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/liquidator/src/rebalance.rs b/bin/liquidator/src/rebalance.rs index 876587f86..797739503 100644 --- a/bin/liquidator/src/rebalance.rs +++ b/bin/liquidator/src/rebalance.rs @@ -80,8 +80,8 @@ impl Rebalancer { ) } - rebalance_perps_res.expect("rebalancing perps failed"); - rebalance_tokens_res.expect("rebalancing tokens failed"); + rebalance_perps_res?; + rebalance_tokens_res?; Ok(()) }