@@ -262,7 +262,7 @@ pub enum Event {
262
262
/// The channel_id of the channel which has been closed.
263
263
channel_id : [ u8 ; 32 ] ,
264
264
/// The full transaction received from the user
265
- transaction : Option < Transaction >
265
+ transaction : Transaction
266
266
}
267
267
}
268
268
@@ -353,7 +353,7 @@ impl Writeable for Event {
353
353
11u8 . write ( writer) ?;
354
354
write_tlv_fields ! ( writer, {
355
355
( 0 , channel_id, required) ,
356
- ( 2 , transaction, option )
356
+ ( 2 , transaction, required )
357
357
} )
358
358
} ,
359
359
// Note that, going forward, all new events must only write data inside of
@@ -489,12 +489,11 @@ impl MaybeReadable for Event {
489
489
} ,
490
490
11u8 => {
491
491
let mut channel_id = [ 0 ; 32 ] ;
492
- let mut transaction = None ;
492
+ let mut transaction = Transaction { version : 2 , lock_time : 0 , input : Vec :: new ( ) , output : Vec :: new ( ) } ;
493
493
read_tlv_fields ! ( reader, {
494
494
( 0 , channel_id, required) ,
495
- ( 2 , transaction, ignorable ) ,
495
+ ( 2 , transaction, required ) ,
496
496
} ) ;
497
- if transaction. is_none ( ) { return Ok ( None ) ; }
498
497
Ok ( Some ( Event :: DiscardFunding { channel_id, transaction } ) )
499
498
} ,
500
499
// Versions prior to 0.0.100 did not ignore odd types, instead returning InvalidValue.
0 commit comments