@@ -166,6 +166,7 @@ pub struct ChannelMonitor {
166
166
key_storage : KeyStorage ,
167
167
delayed_payment_base_key : PublicKey ,
168
168
their_htlc_base_key : Option < PublicKey > ,
169
+ their_delayed_payment_base_key : Option < PublicKey > ,
169
170
// first is the idx of the first of the two revocation points
170
171
their_cur_revocation_points : Option < ( u64 , PublicKey , Option < PublicKey > ) > ,
171
172
@@ -207,6 +208,7 @@ impl Clone for ChannelMonitor {
207
208
key_storage : self . key_storage . clone ( ) ,
208
209
delayed_payment_base_key : self . delayed_payment_base_key . clone ( ) ,
209
210
their_htlc_base_key : self . their_htlc_base_key . clone ( ) ,
211
+ their_delayed_payment_base_key : self . their_delayed_payment_base_key . clone ( ) ,
210
212
their_cur_revocation_points : self . their_cur_revocation_points . clone ( ) ,
211
213
212
214
our_to_self_delay : self . our_to_self_delay ,
@@ -238,6 +240,7 @@ impl PartialEq for ChannelMonitor {
238
240
self . key_storage != other. key_storage ||
239
241
self . delayed_payment_base_key != other. delayed_payment_base_key ||
240
242
self . their_htlc_base_key != other. their_htlc_base_key ||
243
+ self . their_delayed_payment_base_key != other. their_delayed_payment_base_key ||
241
244
self . their_cur_revocation_points != other. their_cur_revocation_points ||
242
245
self . our_to_self_delay != other. our_to_self_delay ||
243
246
self . their_to_self_delay != other. their_to_self_delay ||
@@ -274,6 +277,7 @@ impl ChannelMonitor {
274
277
} ,
275
278
delayed_payment_base_key : delayed_payment_base_key. clone ( ) ,
276
279
their_htlc_base_key : None ,
280
+ their_delayed_payment_base_key : None ,
277
281
their_cur_revocation_points : None ,
278
282
279
283
our_to_self_delay : our_to_self_delay,
@@ -482,6 +486,10 @@ impl ChannelMonitor {
482
486
self . their_htlc_base_key = Some ( their_htlc_base_key. clone ( ) ) ;
483
487
}
484
488
489
+ pub ( super ) fn set_their_delayed_payment_base_key ( & mut self , their_delayed_payment_base_key : & PublicKey ) {
490
+ self . their_delayed_payment_base_key = Some ( their_delayed_payment_base_key. clone ( ) ) ;
491
+ }
492
+
485
493
pub ( super ) fn set_their_to_self_delay ( & mut self , their_to_self_delay : u16 ) {
486
494
self . their_to_self_delay = Some ( their_to_self_delay) ;
487
495
}
@@ -531,6 +539,7 @@ impl ChannelMonitor {
531
539
532
540
res. extend_from_slice ( & self . delayed_payment_base_key . serialize ( ) ) ;
533
541
res. extend_from_slice ( & self . their_htlc_base_key . as_ref ( ) . unwrap ( ) . serialize ( ) ) ;
542
+ res. extend_from_slice ( & self . their_delayed_payment_base_key . as_ref ( ) . unwrap ( ) . serialize ( ) ) ;
534
543
535
544
match self . their_cur_revocation_points {
536
545
Some ( ( idx, pubkey, second_option) ) => {
@@ -705,6 +714,7 @@ impl ChannelMonitor {
705
714
706
715
let delayed_payment_base_key = unwrap_obj ! ( PublicKey :: from_slice( & secp_ctx, read_bytes!( 33 ) ) ) ;
707
716
let their_htlc_base_key = Some ( unwrap_obj ! ( PublicKey :: from_slice( & secp_ctx, read_bytes!( 33 ) ) ) ) ;
717
+ let their_delayed_payment_base_key = Some ( unwrap_obj ! ( PublicKey :: from_slice( & secp_ctx, read_bytes!( 33 ) ) ) ) ;
708
718
709
719
let their_cur_revocation_points = {
710
720
let first_idx = byte_utils:: slice_to_be48 ( read_bytes ! ( 6 ) ) ;
@@ -867,6 +877,7 @@ impl ChannelMonitor {
867
877
key_storage,
868
878
delayed_payment_base_key,
869
879
their_htlc_base_key,
880
+ their_delayed_payment_base_key,
870
881
their_cur_revocation_points,
871
882
872
883
our_to_self_delay,
0 commit comments