Stop freeing holding cell in updates, fix freeing in revoke
[rust-lightning] / src / ln / channelmonitor.rs
index ac08bf5a37bbfa402a1b40179986c5d1cdc6b4f9..5ac9a6b0ab01cd93eb276b7a68ff29e2b7763298 100644 (file)
@@ -4,7 +4,6 @@ use bitcoin::blockdata::script::Script;
 use bitcoin::util::hash::Sha256dHash;
 use bitcoin::util::bip143;
 
-use crypto::sha2::Sha256;
 use crypto::digest::Digest;
 
 use secp256k1::{Secp256k1,Message,Signature};
@@ -14,6 +13,7 @@ use ln::msgs::HandleError;
 use ln::chan_utils;
 use ln::chan_utils::HTLCOutputInCommitment;
 use chain::chaininterface::{ChainListener, ChainWatchInterface, BroadcasterInterface};
+use util::sha2::Sha256;
 
 use std::collections::HashMap;
 use std::sync::{Arc,Mutex};
@@ -456,7 +456,7 @@ impl ChannelMonitor {
                        for txin in tx.input.iter() {
                                if self.funding_txo.is_none() || (txin.prev_hash == self.funding_txo.unwrap().0 && txin.prev_index == self.funding_txo.unwrap().1 as u32) {
                                        for tx in self.check_spend_transaction(tx, height).iter() {
-                                               broadcaster.broadcast_transaction(tx); // TODO: use result
+                                               broadcaster.broadcast_transaction(tx);
                                        }
                                }
                        }