From: Matt Corallo Date: Tue, 25 May 2021 21:18:49 +0000 (+0000) Subject: Add dummy OutPoint constructor to be used when reading it in a TLV X-Git-Tag: v0.0.98~14^2~6 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=557aa8161961f2ab87865a643e332cf3a5df499e;p=rust-lightning Add dummy OutPoint constructor to be used when reading it in a TLV --- diff --git a/lightning/src/chain/transaction.rs b/lightning/src/chain/transaction.rs index 502eb895b..4db5fbed6 100644 --- a/lightning/src/chain/transaction.rs +++ b/lightning/src/chain/transaction.rs @@ -73,6 +73,14 @@ impl OutPoint { 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 });