File tree 1 file changed +1
-5
lines changed
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -3339,11 +3339,6 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
3339
3339
channel_id : self . channel_id ( ) ,
3340
3340
data : "funding tx had wrong script/value" . to_owned ( )
3341
3341
} ) ;
3342
- } else if txo_idx > 0xff_ff {
3343
- return Err ( msgs:: ErrorMessage {
3344
- channel_id : self . channel_id ( ) ,
3345
- data : "funding tx output was > 2**16 which makes short_channel_id impossible to calculate" . to_owned ( )
3346
- } ) ;
3347
3342
} else {
3348
3343
if self . channel_outbound {
3349
3344
for input in tx. input . iter ( ) {
@@ -3358,6 +3353,7 @@ impl<ChanSigner: ChannelKeys> Channel<ChanSigner> {
3358
3353
if height > 0xff_ff_ff || ( * index_in_block) > 0xff_ff_ff {
3359
3354
panic ! ( "Block was bogus - either height 16 million or had > 16 million transactions" ) ;
3360
3355
}
3356
+ assert ! ( txo_idx <= 0xffff ) ; // txo_idx is a (u16 as usize), so this is just listed here for completeness
3361
3357
self . funding_tx_confirmations = 1 ;
3362
3358
self . short_channel_id = Some ( ( ( height as u64 ) << ( 5 * 8 ) ) |
3363
3359
( ( * index_in_block as u64 ) << ( 2 * 8 ) ) |
You can’t perform that action at this time.
0 commit comments