@@ -418,13 +418,11 @@ fn cmd_rawsign<'a>() -> clap::App<'a, 'a> {
418
418
args:: arg ( "psbt" , "PSBT to finalize, either base64/hex or a file path" ) . required ( false ) ,
419
419
args:: arg ( "input-idx" , "the input index to edit" ) . required ( true ) ,
420
420
args:: arg ( "priv-key" , "the private key in WIF/hex" ) . required ( true ) ,
421
- args:: flag ( "compressed" , "Whether the corresponding pk is compressed" )
422
- . required ( false )
423
- . default_value ( "true" ) ,
424
421
args:: flag ( "raw-stdout" , "output the raw bytes of the result to stdout" )
425
422
. short ( "r" ) ,
426
423
args:: opt ( "output" , "where to save the resulting PSBT file -- in place if omitted" )
427
424
. short ( "o" ) ,
425
+ args:: opt ( "uncompressed" , "Whether the corresponding pubkey should be used uncompressed" ) ,
428
426
] )
429
427
}
430
428
@@ -436,8 +434,7 @@ fn exec_rawsign<'a>(args: &clap::ArgMatches<'a>) {
436
434
let sk = args. need_privkey ( "priv-key" ) . inner ;
437
435
let i = args. value_of ( "input-idx" ) . need ( "Input index not provided" )
438
436
. parse :: < usize > ( ) . need ( "input-idx must be a positive integer" ) ;
439
- let compressed = args. value_of ( "compressed" ) . unwrap ( )
440
- . parse :: < bool > ( ) . need ( "Compressed must be boolean" ) ;
437
+ let uncompressed = args. is_present ( "uncompressed" ) ;
441
438
442
439
if i >= psbt. inputs . len ( ) {
443
440
panic ! ( "PSBT input index out of range" )
@@ -448,7 +445,7 @@ fn exec_rawsign<'a>(args: &clap::ArgMatches<'a>) {
448
445
449
446
let pk = secp256k1:: PublicKey :: from_secret_key ( & SECP , & sk) ;
450
447
let pk = bitcoin:: PublicKey {
451
- compressed : compressed ,
448
+ compressed : !uncompressed ,
452
449
inner : pk,
453
450
} ;
454
451
let msg = psbt. sighash_msg ( i, & mut cache, None )
0 commit comments