Skip to content

Commit 7d71fec

Browse files
committed
let seed nodes not error on orderbook requests
1 parent b1223a8 commit 7d71fec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

mm2src/mm2_main/src/lp_ordermatch.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,13 @@ async fn request_and_fill_orderbook(ctx: &MmArc, base: &str, rel: &str) -> Resul
432432
},
433433
_peer_id,
434434
)) => (pubkey_orders, protocol_infos, conf_infos),
435-
None => return Err("No response received from any peer for GetOrderbook request".to_string()),
435+
None => {
436+
if i_am_seed {
437+
return Ok(());
438+
} else {
439+
return Err("No response received from any peer for GetOrderbook request".to_string());
440+
}
441+
},
436442
};
437443

438444
let ordermatch_ctx = OrdermatchContext::from_ctx(ctx).unwrap();

0 commit comments

Comments
 (0)