Skip to content

Commit 2f872c8

Browse files
committed
Add dummy OutPoint constructor to be used when reading it in a TLV
1 parent 0e30c91 commit 2f872c8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lightning/src/chain/transaction.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,14 @@ impl OutPoint {
7373
vout: self.index as u32,
7474
}
7575
}
76+
77+
/// Creates a dummy BitcoinOutPoint, useful for serializing into.
78+
pub(crate) fn null() -> Self {
79+
Self {
80+
txid: Default::default(),
81+
index: 0
82+
}
83+
}
7684
}
7785

7886
impl_writeable!(OutPoint, 0, { txid, index });

0 commit comments

Comments
 (0)