X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=lightning%2Fsrc%2Fchain%2Ftransaction.rs;h=ce449a4102c31498232874498c3e6cced2da8c20;hb=2d4bf974e5b588ce93cc8f1e133cda30ca1d91ee;hp=4db5fbed6a8b9ed50f476f93c5a9581243857e33;hpb=c05347f48a4ff2789ae261ee8c8f3f4277489420;p=rust-lightning diff --git a/lightning/src/chain/transaction.rs b/lightning/src/chain/transaction.rs index 4db5fbed..ce449a41 100644 --- a/lightning/src/chain/transaction.rs +++ b/lightning/src/chain/transaction.rs @@ -66,28 +66,22 @@ 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 + /// + /// This is not exported to bindings users 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, vout: self.index as u32, } } - - /// Creates a dummy BitcoinOutPoint, useful for deserializing into. - pub(crate) fn null() -> Self { - Self { - txid: Default::default(), - index: 0 - } - } } -impl_writeable!(OutPoint, 0, { txid, index }); +impl_writeable!(OutPoint, { txid, index }); #[cfg(test)] mod tests { - use chain::transaction::OutPoint; + use crate::chain::transaction::OutPoint; use bitcoin::blockdata::transaction::Transaction; use bitcoin::consensus::encode;