Overhaul ChannelMonitor/OnchainTxHandler to new nomenclature
[rust-lightning] / lightning / src / chain / transaction.rs
index 33b9c7244a37d1ad13adedda973c70a23c40f10a..946562bc1781f95f77f62ce4aa252509d77eec10 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.
+
 //! Contains simple structs describing parts of transactions on the chain.
 
 use bitcoin::hash_types::Txid;
@@ -16,11 +25,6 @@ pub struct OutPoint {
 }
 
 impl OutPoint {
-       /// Creates a new `OutPoint` from the txid and the index.
-       pub fn new(txid: Txid, index: u16) -> OutPoint {
-               OutPoint { txid, index }
-       }
-
        /// Convert an `OutPoint` to a lightning channel id.
        pub fn to_channel_id(&self) -> [u8; 32] {
                let mut res = [0; 32];
@@ -31,6 +35,7 @@ impl OutPoint {
        }
 
        /// Converts this OutPoint into the OutPoint field as used by rust-bitcoin
+       /// (C-not exported) as the same type is used universally in the C bindings for all outpoints
        pub fn into_bitcoin_outpoint(self) -> BitcoinOutPoint {
                BitcoinOutPoint {
                        txid: self.txid,