File tree 2 files changed +5
-11
lines changed
2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -407,7 +407,10 @@ impl From<Network> for Currency {
407
407
Network :: Testnet => Currency :: BitcoinTestnet ,
408
408
Network :: Regtest => Currency :: Regtest ,
409
409
Network :: Signet => Currency :: Signet ,
410
- _ => unreachable ! ( ) ,
410
+ _ => {
411
+ debug_assert ! ( false , "Need to handle new rust-bitcoin network type" ) ;
412
+ Currency :: Regtest
413
+ } ,
411
414
}
412
415
}
413
416
}
Original file line number Diff line number Diff line change @@ -926,20 +926,11 @@ impl InvoiceContents {
926
926
} ;
927
927
928
928
let program = & address. program ;
929
- if program. len ( ) < 2 || program. len ( ) > 40 {
930
- return None ;
931
- }
932
-
933
929
let witness_program = match WitnessProgram :: new ( version, program. clone ( ) ) {
934
930
Ok ( witness_program) => witness_program,
935
931
Err ( _) => return None ,
936
932
} ;
937
- let address = Address :: new ( network, Payload :: WitnessProgram ( witness_program) ) ;
938
- if !address. is_spend_standard ( ) && version == WitnessVersion :: V0 {
939
- return None ;
940
- }
941
-
942
- Some ( address)
933
+ Some ( Address :: new ( network, Payload :: WitnessProgram ( witness_program) ) )
943
934
} ;
944
935
945
936
self . fields ( ) . fallbacks
You can’t perform that action at this time.
0 commit comments