diff --git a/src/index.rs b/src/index.rs index 13b5eb9b4a..537377dbf6 100644 --- a/src/index.rs +++ b/src/index.rs @@ -911,58 +911,6 @@ mod tests { } } - #[test] - fn inscriptions_below_first_inscription_height_are_skipped() { - let inscription = inscription("text/plain", "hello"); - let template = TransactionTemplate { - inputs: &[(1, 0, 0)], - witness: inscription.to_witness(), - ..Default::default() - }; - - { - let context = Context::builder().build(); - context.mine_blocks(1); - let txid = context.rpc_server.broadcast_tx(template.clone()); - let inscription_id = InscriptionId::from(txid); - context.mine_blocks(1); - - assert_eq!( - context.index.get_inscription_by_id(inscription_id).unwrap(), - Some(inscription) - ); - - assert_eq!( - context - .index - .get_inscription_satpoint_by_id(inscription_id) - .unwrap(), - Some(SatPoint { - outpoint: OutPoint { txid, vout: 0 }, - offset: 0, - }) - ); - } - - { - let context = Context::builder() - .arg("--first-inscription-height=3") - .build(); - context.mine_blocks(1); - let txid = context.rpc_server.broadcast_tx(template); - let inscription_id = InscriptionId::from(txid); - context.mine_blocks(1); - - assert_eq!( - context - .index - .get_inscription_satpoint_by_id(inscription_id) - .unwrap(), - None, - ); - } - } - #[test] fn list_first_coinbase_transaction() { let context = Context::builder().arg("--index-sats").build(); diff --git a/src/index/updater.rs b/src/index/updater.rs index 4c202b2fe3..32640d5266 100644 --- a/src/index/updater.rs +++ b/src/index/updater.rs @@ -168,7 +168,8 @@ impl Updater { let client = Client::new(&index.rpc_url, index.auth.clone()).context("failed to connect to RPC URL")?; - let first_inscription_height = index.first_inscription_height; + // NB: We temporarily always fetch transactions, to avoid expensive cache misses. + let first_inscription_height = index.first_inscription_height.min(0); thread::spawn(move || loop { if let Some(height_limit) = height_limit {