mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
Merge #19836: rpc: Properly deserialize txs with witness before signing
3333077823rpc: Adjust witness-tx deserialize error message (MarcoFalke)cccc752569rpc: Properly deserialize txs with witness before signing (MarcoFalke) Pull request description: Signing a transaction can only happen when the transaction has inputs. A transaction with inputs can always be deserialized as witness-transaction. If `try_no_witness` decoding is attempted, this will lead to rare intermittent failures. Fixes #18803 ACKs for top commit: achow101: ACK3333077823ajtowns: ACK3333077823Tree-SHA512: 73f8a5cdfe03fb0e68908d2fa09752c346406f455694a020ec0dd1267ef8f0a583b8e84063ea74aac127106dd193b72623ca6d81469a94b3f5b3c766ebf2c42b
This commit is contained in:
@@ -352,7 +352,7 @@ static RPCHelpMan generateblock()
|
||||
txs.push_back(MakeTransactionRef(std::move(mtx)));
|
||||
|
||||
} else {
|
||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, strprintf("Transaction decode failed for %s", str));
|
||||
throw JSONRPCError(RPC_DESERIALIZATION_ERROR, strprintf("Transaction decode failed for %s. Make sure the tx has at least one input.", str));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user