mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-04-29 14:59:39 -04:00
Restrict joinpsbts to PSBTv0 only
This commit is contained in:
parent
e79474e561
commit
29c3fb76ef
1 changed files with 3 additions and 0 deletions
|
@ -1900,6 +1900,9 @@ static RPCHelpMan joinpsbts()
|
|||
if (!DecodeBase64PSBT(psbtx, txs[i].get_str(), error)) {
|
||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, strprintf("TX decode failed %s", error));
|
||||
}
|
||||
if (psbtx.GetVersion() != 0) {
|
||||
throw JSONRPCError(RPC_INVALID_PARAMETER, "joinpsbts only operates on version 0 PSBTs");
|
||||
}
|
||||
psbtxs.push_back(psbtx);
|
||||
// Choose the highest version number
|
||||
if (*psbtx.tx_version > best_version) {
|
||||
|
|
Loading…
Add table
Reference in a new issue