From 557aa8161961f2ab87865a643e332cf3a5df499e Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Tue, 25 May 2021 21:18:49 +0000 Subject: [PATCH] Add dummy OutPoint constructor to be used when reading it in a TLV --- lightning/src/chain/transaction.rs | 8 ++++++++ 1 file changed, 8 insertions(+) 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 }); -- 2.39.5