diff --git a/crates/brk_logger/src/lib.rs b/crates/brk_logger/src/lib.rs index f3a139a0e..433a56597 100644 --- a/crates/brk_logger/src/lib.rs +++ b/crates/brk_logger/src/lib.rs @@ -28,7 +28,7 @@ pub fn init(path: Option<&Path>) -> io::Result<()> { } Builder::from_env(Env::default().default_filter_or( - "debug,bitcoin=off,bitcoincore-rpc=off,fjall=off,brk_fjall=off,lsm_tree=off,rolldown=off,rmcp=off,brk_rmcp=off,tracing=off,aide=off,rustls=off", + "info,bitcoin=off,bitcoincore-rpc=off,fjall=off,brk_fjall=off,lsm_tree=off,rolldown=off,rmcp=off,brk_rmcp=off,tracing=off,aide=off,rustls=off", // "debug,fjall=trace,bitcoin=off,bitcoincore-rpc=off,rolldown=off,rmcp=off,brk_rmcp=off,tracing=off,aide=off,rustls=off", )) .format(move |buf, record| { diff --git a/crates/brk_monitor/src/lib.rs b/crates/brk_monitor/src/lib.rs index 925f184d2..18d36d395 100644 --- a/crates/brk_monitor/src/lib.rs +++ b/crates/brk_monitor/src/lib.rs @@ -76,7 +76,12 @@ impl MempoolInner { .collect::>() } .into_iter() - .filter_map(|txid| self.client.get_transaction(&txid).ok().map(|tx| (txid, tx))) + .filter_map(|txid| { + self.client + .get_mempool_transaction(&txid) + .ok() + .map(|tx| (txid, tx)) + }) .collect::>(); let mut txs = self.txs.write(); diff --git a/crates/brk_query/src/chain/transactions.rs b/crates/brk_query/src/chain/transactions.rs index 99e4f3a6e..7bfdea0c4 100644 --- a/crates/brk_query/src/chain/transactions.rs +++ b/crates/brk_query/src/chain/transactions.rs @@ -64,7 +64,7 @@ pub fn get_transaction(TxidPath { txid }: TxidPath, query: &Query) -> Result(&self, txid: &'a T) -> Result + pub fn get_transaction<'a, T, H>( + &self, + txid: &'a T, + block_hash: Option<&'a H>, + ) -> brk_error::Result + where + &'a T: Into<&'a bitcoin::Txid>, + &'a H: Into<&'a bitcoin::BlockHash>, + { + let tx = self.get_raw_transaction(txid, block_hash)?; + Ok(tx) + } + + pub fn get_mempool_transaction<'a, T>(&self, txid: &'a T) -> Result where &'a T: Into<&'a bitcoin::Txid>, {