diff --git a/src/mempool.rs b/src/mempool.rs index 49e931b..acc916f 100644 --- a/src/mempool.rs +++ b/src/mempool.rs @@ -75,8 +75,14 @@ impl Mempool { .collect() } - pub fn sync(&mut self, daemon: &Daemon) -> Result<()> { - let txids = daemon.get_mempool_txids()?; + pub fn sync(&mut self, daemon: &Daemon) { + let txids = match daemon.get_mempool_txids() { + Ok(txids) => txids, + Err(e) => { + warn!("mempool sync failed: {}", e); + return; + } + }; debug!("loading {} mempool transactions", txids.len()); let new_txids = HashSet::::from_iter(txids); @@ -112,7 +118,6 @@ impl Mempool { added, removed, ); - Ok(()) } fn add_entry(&mut self, txid: Txid, tx: Transaction, entry: json::GetMempoolEntryResult) { diff --git a/src/tracker.rs b/src/tracker.rs index 4d7ab5d..2c00db1 100644 --- a/src/tracker.rs +++ b/src/tracker.rs @@ -67,7 +67,7 @@ impl Tracker { pub fn sync(&mut self, daemon: &Daemon) -> Result<()> { self.index.sync(daemon, self.index_batch_size)?; if !self.ignore_mempool { - self.mempool.sync(daemon)?; + self.mempool.sync(daemon); } // TODO: double check tip - and retry on diff Ok(())