projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Hand payment preimages into channel monitors when claimed
[rust-lightning]
/
src
/
ln
/
channelmonitor.rs
diff --git
a/src/ln/channelmonitor.rs
b/src/ln/channelmonitor.rs
index 53440f4361341c7af9d5d441ebca3559030698e4..27010d522dfe7037485c4bfac6f18237417df829 100644
(file)
--- a/
src/ln/channelmonitor.rs
+++ b/
src/ln/channelmonitor.rs
@@
-270,6
+270,12
@@
impl ChannelMonitor {
min
}
min
}
+ pub fn provide_payment_preimage(&mut self, payment_preimage: &[u8; 32]) {
+ //TODO: Some kind of timeout here or ability to mark all states containing this preimage
+ //revoked?
+ self.payment_preimages.push(payment_preimage.clone());
+ }
+
#[inline]
fn check_spend_transaction(&self, tx: &Transaction, height: u32) -> Vec<Transaction> {
// Most secp and related errors trying to create keys means we have no hope of constructing
#[inline]
fn check_spend_transaction(&self, tx: &Transaction, height: u32) -> Vec<Transaction> {
// Most secp and related errors trying to create keys means we have no hope of constructing