From: Matt Corallo Date: Fri, 20 Jul 2018 02:06:07 +0000 (-0400) Subject: Expose the script_pubkey being monitored in chain watch (fixes #44) X-Git-Tag: v0.0.12~387^2~1 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=68e6beab7cfb1be6f3d6d1356c7da90b0227849a;p=rust-lightning Expose the script_pubkey being monitored in chain watch (fixes #44) --- diff --git a/src/chain/chaininterface.rs b/src/chain/chaininterface.rs index 8fef60b3b..f99f581f1 100644 --- a/src/chain/chaininterface.rs +++ b/src/chain/chaininterface.rs @@ -16,7 +16,7 @@ pub trait ChainWatchInterface: Sync + Send { /// Provides an outpoint which must be watched for, providing any transactions which spend the /// given outpoint. - fn install_watch_outpoint(&self, outpoint: (Sha256dHash, u32)); + fn install_watch_outpoint(&self, outpoint: (Sha256dHash, u32), out_script: &Script); /// Indicates that a listener needs to see all transactions. fn watch_all_txn(&self); @@ -76,7 +76,7 @@ impl ChainWatchInterface for ChainWatchInterfaceUtil { self.reentered.fetch_add(1, Ordering::Relaxed); } - fn install_watch_outpoint(&self, outpoint: (Sha256dHash, u32)) { + fn install_watch_outpoint(&self, outpoint: (Sha256dHash, u32), _out_script: &Script) { let mut watched = self.watched.lock().unwrap(); watched.1.push(outpoint); self.reentered.fetch_add(1, Ordering::Relaxed); @@ -158,7 +158,7 @@ impl ChainWatchInterfaceUtil { self.does_match_tx_unguarded (tx, &watched) } - fn does_match_tx_unguarded (&self, tx: &Transaction, watched: &MutexGuard<(Vec