diff --git a/src/index/updater/inscription_updater/stream.rs b/src/index/updater/inscription_updater/stream.rs index f9b0b99ffe..2dd0dfbe96 100644 --- a/src/index/updater/inscription_updater/stream.rs +++ b/src/index/updater/inscription_updater/stream.rs @@ -299,7 +299,7 @@ impl StreamEvent { .and_then(|txout| { Address::from_script(&txout.script_pubkey, StreamEvent::get_network()) .map_err(|e| { - error!( + warn!( "StreamEvent::with_transfer could not parse old_owner address: {}", e ); diff --git a/src/rarity.rs b/src/rarity.rs index 22b236573a..812428bde1 100644 --- a/src/rarity.rs +++ b/src/rarity.rs @@ -147,10 +147,6 @@ mod tests { assert_eq!( Sat(50 * COIN_VALUE * u64::from(DIFFCHANGE_INTERVAL) - 1).rarity(), - Rarity::Common - ); - assert_eq!( - Sat(50 * COIN_VALUE * DIFFCHANGE_INTERVAL - 1).rarity(), Rarity::BlackRare ); assert_eq!( @@ -164,10 +160,6 @@ mod tests { assert_eq!( Sat(50 * COIN_VALUE * u64::from(SUBSIDY_HALVING_INTERVAL) - 1).rarity(), - Rarity::Common - ); - assert_eq!( - Sat(50 * COIN_VALUE * SUBSIDY_HALVING_INTERVAL - 1).rarity(), Rarity::BlackEpic ); assert_eq!( diff --git a/src/subcommand/server/middleware.rs b/src/subcommand/server/middleware.rs index eb1d7bdc25..a326238a7f 100644 --- a/src/subcommand/server/middleware.rs +++ b/src/subcommand/server/middleware.rs @@ -8,12 +8,11 @@ use opentelemetry::{ pub(crate) async fn tracing_layer(request: Request, next: Next) -> Response { let tracer = global::tracer("ord-kafka"); let cx = opentelemetry::Context::current(); - let route = request - .extensions() - .get::() - .unwrap() - .as_str() - .to_string(); + let route = if let Some(matched) = request.extensions().get::() { + matched.as_str().to_string() + } else { + "unknown_path".to_string() + }; let uri = request.uri(); let host = uri.host().unwrap_or_default(); let path = uri.path(); diff --git a/src/subcommand/wallet/sats.rs b/src/subcommand/wallet/sats.rs index f9ce7b9ee1..dcdbd09876 100644 --- a/src/subcommand/wallet/sats.rs +++ b/src/subcommand/wallet/sats.rs @@ -187,13 +187,13 @@ mod tests { rare_sats(vec![( outpoint(1), vec![( - 50 * COIN_VALUE * DIFFCHANGE_INTERVAL - 1, - 50 * COIN_VALUE * DIFFCHANGE_INTERVAL + 50 * COIN_VALUE * u64::from(DIFFCHANGE_INTERVAL) - 1, + 50 * COIN_VALUE * u64::from(DIFFCHANGE_INTERVAL) )], )]), vec![( outpoint(1), - Sat(50 * COIN_VALUE * DIFFCHANGE_INTERVAL - 1), + Sat(50 * COIN_VALUE * u64::from(DIFFCHANGE_INTERVAL) - 1), 0, Rarity::BlackRare )]