aboutsummaryrefslogtreecommitdiff
path: root/src/rest.cpp
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2022-03-17 07:10:25 +0100
committerMarcoFalke <falke.marco@gmail.com>2022-03-17 07:10:27 +0100
commit74f8c551e9ba76ad21b39226d9792210d3704c59 (patch)
tree8a1e64cb9efad6635c23f2351d6cc8dc48136e7d /src/rest.cpp
parentd6cb4e8ff0d0772fd549240c21cf08e5213259be (diff)
parent12cc0201c26f4214d9e1dee1e6d0ddb97b7ab20f (diff)
Merge bitcoin/bitcoin#24553: contrib: fix signet miner (sighash mismatch)
12cc0201c26f4214d9e1dee1e6d0ddb97b7ab20f contrib: fix signet miner (sighash mismatch) (Sebastian Falbesoner) Pull request description: gruve-p reported that the signet miner doesn't work anymore (see https://github.com/bitcoin/bitcoin/issues/24501#issuecomment-1062088351), failing with the following error of the `walletprocesspsbt` RPC: ``` error code: -22 error message: Specified sighash value does not match value stored in PSBT ..... subprocess.CalledProcessError: Command '['bitcoin-cli', '-signet', '-stdin', 'walletprocesspsbt']' returned non-zero exit status 22 ``` PSBT signing was changed to use SIGHASH_DEFAULT by default in #22514. The signet miner script sets the sighash type of the created PSBT to SIGHASH_ALL (3 is the per-input type PSBT_IN_SIGHASH_TYPE, following a little-endian 32 unsigned integer of the sighash type): https://github.com/bitcoin/bitcoin/blob/e04720ec3336e3df7fce522e3b1da972aa65ff62/contrib/signet/miner#L169-L170 hence this leads to a sighash mismatch when the `walletprocesspsbt` RPC is called. Fix this by explicitly passing the correct sighash type. The same change was needed in one of our functional tests, see commit d3992669df826899a3de78a77a366dab46028026. Note that instead of feeding the PSBT via `-stdin` it is directly passed as parameter, as I couldn't figure out a way to pass multiple parameters otherwise (separating by newline also didn't work). ACKs for top commit: kallewoof: ACK 12cc0201c26f4214d9e1dee1e6d0ddb97b7ab20f ajtowns: ACK 12cc0201c26f4214d9e1dee1e6d0ddb97b7ab20f ; code review only Tree-SHA512: 8509e768e96f85e28c0ca0dc2d35874aa29623febddc46bf90472ec38f38cb3a1b5407c563fd9101d07088775d0fdb18e9137cc38955e847885b83c16591c736
Diffstat (limited to 'src/rest.cpp')
0 files changed, 0 insertions, 0 deletions