X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=src%2Fln%2Fchannelmonitor.rs;h=27010d522dfe7037485c4bfac6f18237417df829;hb=8b1a7ede279be51744d6fe91af2c8cdd03175f6d;hp=53440f4361341c7af9d5d441ebca3559030698e4;hpb=890e3cb165196b6a5b7ad68dbafea7ed35c8a50a;p=rust-lightning diff --git a/src/ln/channelmonitor.rs b/src/ln/channelmonitor.rs index 53440f43..27010d52 100644 --- a/src/ln/channelmonitor.rs +++ b/src/ln/channelmonitor.rs @@ -270,6 +270,12 @@ impl ChannelMonitor { 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 { // Most secp and related errors trying to create keys means we have no hope of constructing