+ let mut already = false;
+ {
+ if let Some(counter) = self.broadcasted_txn.lock().unwrap().get_mut(&tx.txid()) {
+ match counter {
+ 0 => { *counter = 1; already = true }, // We still authorize at least 2 duplicata for a given TXID to account ChannelManager/ChannelMonitor broadcast
+ 1 => return,
+ _ => panic!()
+ }
+ }
+ }
+ if !already {
+ self.broadcasted_txn.lock().unwrap().insert(tx.txid(), 0);
+ }
+ print!("\nFRESH BROADCAST {}\n\n", tx.txid());