Replace WatchEvent usage with get_outputs_to_watch
[rust-lightning] / lightning / src / util / test_utils.rs
index 6cdfb7f9d63cb5708f414472189ec23af5ef63ad..210d62485acf4131d7904a18477b9e82d9d655c2 100644 (file)
@@ -423,11 +423,11 @@ impl chain::Access for TestChainSource {
 }
 
 impl chain::Filter for TestChainSource {
-       fn register_tx(&self, txid: Txid, script_pubkey: Script) {
-               self.watched_txn.lock().unwrap().insert((txid, script_pubkey));
+       fn register_tx(&self, txid: &Txid, script_pubkey: &Script) {
+               self.watched_txn.lock().unwrap().insert((*txid, script_pubkey.clone()));
        }
 
-       fn register_output(&self, outpoint: OutPoint, script_pubkey: Script) {
-               self.watched_outputs.lock().unwrap().insert((outpoint, script_pubkey));
+       fn register_output(&self, outpoint: &OutPoint, script_pubkey: &Script) {
+               self.watched_outputs.lock().unwrap().insert((*outpoint, script_pubkey.clone()));
        }
 }