mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Merge bitcoin/bitcoin#22514: psbt: Actually use SIGHASH_DEFAULT for PSBT signing
c0405ee27frpc: Document that DEFAULT is for Taproot, ALL for everything else (Andrew Chow)d3992669dfpsbt: Actually use SIGHASH_DEFAULT (Andrew Chow)eb9a1a2c59psbt: Make sighash_type std::optional<int> (Andrew Chow) Pull request description: Make the behavior align with the help text by actually using SIGHASH_DEFAULT as the default sighash for signing PSBTs. ACKs for top commit: Sjors: re-utACKc0405ee27fTree-SHA512: 5199fb41de416b2f10ac451f824e7c94b428ba11fdb9e50f0027c692e959ce5813a340c34a4e52d7aa128e12008303d80939a693eff36a869720e45442119828
This commit is contained in:
@@ -785,7 +785,7 @@ static RPCHelpMan signrawtransactionwithkey()
|
||||
},
|
||||
},
|
||||
},
|
||||
{"sighashtype", RPCArg::Type::STR, RPCArg::Default{"DEFAULT"}, "The signature hash type. Must be one of:\n"
|
||||
{"sighashtype", RPCArg::Type::STR, RPCArg::Default{"DEFAULT for Taproot, ALL otherwise"}, "The signature hash type. Must be one of:\n"
|
||||
" \"DEFAULT\"\n"
|
||||
" \"ALL\"\n"
|
||||
" \"NONE\"\n"
|
||||
@@ -1255,8 +1255,8 @@ static RPCHelpMan decodepsbt()
|
||||
}
|
||||
|
||||
// Sighash
|
||||
if (input.sighash_type > 0) {
|
||||
in.pushKV("sighash", SighashToStr((unsigned char)input.sighash_type));
|
||||
if (input.sighash_type != std::nullopt) {
|
||||
in.pushKV("sighash", SighashToStr((unsigned char)*input.sighash_type));
|
||||
}
|
||||
|
||||
// Redeem script and witness script
|
||||
|
||||
Reference in New Issue
Block a user