Relicense as dual Apache-2.0 + MIT
[rust-lightning] / lightning / src / util / macro_logger.rs
index 5a6002d8594201f8d0a30b0c32dde75d0d03fc1f..85484aceae31aa443c3ffdc380be2c1822f736e5 100644 (file)
@@ -1,3 +1,12 @@
+// This file is Copyright its original authors, visible in version control
+// history.
+//
+// This file is licensed under the Apache License, Version 2.0 <LICENSE-APACHE
+// or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
+// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
+// You may not use this file except in accordance with one or both of these
+// licenses.
+
 use chain::transaction::OutPoint;
 use chain::keysinterface::SpendableOutputDescriptor;
 
@@ -43,7 +52,7 @@ macro_rules! log_bytes {
 pub(crate) struct DebugFundingChannelId<'a>(pub &'a Txid, pub u16);
 impl<'a> std::fmt::Display for DebugFundingChannelId<'a> {
        fn fmt(&self, f: &mut std::fmt::Formatter) -> Result<(), std::fmt::Error> {
-               for i in OutPoint::new(self.0.clone(), self.1).to_channel_id().iter() {
+               for i in (OutPoint { txid: self.0.clone(), index: self.1 }).to_channel_id().iter() {
                        write!(f, "{:02x}", i)?;
                }
                Ok(())
@@ -132,7 +141,7 @@ impl<'a> std::fmt::Display for DebugSpendable<'a> {
                        &SpendableOutputDescriptor::DynamicOutputP2WSH { ref outpoint, .. } => {
                                write!(f, "DynamicOutputP2WSH {}:{} marked for spending", outpoint.txid, outpoint.vout)?;
                        }
-                       &SpendableOutputDescriptor::DynamicOutputP2WPKH { ref outpoint, .. } => {
+                       &SpendableOutputDescriptor::StaticOutputRemotePayment { ref outpoint, .. } => {
                                write!(f, "DynamicOutputP2WPKH {}:{} marked for spending", outpoint.txid, outpoint.vout)?;
                        }
                }