diff --git a/deny.toml b/deny.toml index c27fd4a6de..2c6b571716 100644 --- a/deny.toml +++ b/deny.toml @@ -50,9 +50,11 @@ notice = "warn" # RUSTSEC-2021-0113 is related to metrics-util crate that is not actively used for now despite being still present in deps tree # RUSTSEC-2020-0071 is related to time crate, which is used only by chrono in our deps tree, remove when https://github.com/chronotope/chrono/issues/700 is resolved +# RUSTSEC-2022-0040 is related to owning-ref, which seems unmaintained. We need to find a way to get rid of it. https://github.com/KomodoPlatform/atomicDEX-API/issues/1429 ignore = [ "RUSTSEC-2021-0113", "RUSTSEC-2020-0071", + "RUSTSEC-2022-0040", #"RUSTSEC-0000-0000", ] # Threshold for security vulnerabilities, any vulnerability with a CVSS score diff --git a/mm2src/mm2_main/src/lp_ordermatch.rs b/mm2src/mm2_main/src/lp_ordermatch.rs index 91a4a10665..0ab47bfa60 100644 --- a/mm2src/mm2_main/src/lp_ordermatch.rs +++ b/mm2src/mm2_main/src/lp_ordermatch.rs @@ -28,7 +28,7 @@ use coins::utxo::{compressed_pub_key_from_priv_raw, ChecksumType, UtxoAddressFor use coins::{coin_conf, find_pair, lp_coinfind, BalanceTradeFeeUpdatedHandler, CoinProtocol, CoinsContext, FeeApproxStage, MmCoinEnum}; use common::executor::{spawn, Timer}; -use common::log::{error, LogOnError}; +use common::log::{error, warn, LogOnError}; use common::time_cache::TimeCache; use common::{bits256, log, new_uuid, now_ms, spawn_abortable, AbortOnDropHandle}; use crypto::privkey::SerializableSecp256k1Keypair; @@ -625,10 +625,16 @@ fn get_pubkeys_orders(orderbook: &Orderbook, base: String, rel: String) -> GetPu let mut protocol_infos = HashMap::new(); let mut conf_infos = HashMap::new(); for uuid in orders { - let order = orderbook - .order_set - .get(uuid) - .expect("Orderbook::ordered contains an uuid that is not in Orderbook::order_set"); + let order = match orderbook.order_set.get(uuid) { + Some(o) => o, + None => { + warn!( + "Orderbook::ordered contains uuid {} that is not in Orderbook::order_set", + uuid + ); + continue; + }, + }; let uuids = uuids_by_pubkey.entry(order.pubkey.clone()).or_insert_with(Vec::new); protocol_infos.insert(order.uuid, order.base_rel_proto_info()); if let Some(info) = order.conf_settings {