projects
/
rust-lightning
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
cf43002
)
Add dummy OutPoint constructor to be used when reading it in a TLV
author
Matt Corallo
<git@bluematt.me>
Tue, 25 May 2021 21:18:49 +0000
(21:18 +0000)
committer
Matt Corallo
<git@bluematt.me>
Thu, 27 May 2021 21:41:07 +0000
(21:41 +0000)
lightning/src/chain/transaction.rs
patch
|
blob
|
history
diff --git
a/lightning/src/chain/transaction.rs
b/lightning/src/chain/transaction.rs
index 502eb895b2683e4ad3b7fa5bc34f367111781ede..4db5fbed6a8b9ed50f476f93c5a9581243857e33 100644
(file)
--- a/
lightning/src/chain/transaction.rs
+++ b/
lightning/src/chain/transaction.rs
@@
-73,6
+73,14
@@
impl OutPoint {
vout: self.index as u32,
}
}
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, 0, { txid, index });