Merge fae94785d9 into merged_master (Bitcoin PR #17524)

lol converting the psbt test vector to a pset one was pretty brutal. Conversion to
hex using rust-bitcoin and then manual hex-editing in vim.
This commit is contained in:
Andrew Poelstra 2020-11-14 16:51:56 +00:00
commit 9709d02c23
6 changed files with 29 additions and 1 deletions

View file

@ -7,6 +7,7 @@
#include <node/psbt.h>
#include <policy/policy.h>
#include <policy/settings.h>
#include <tinyformat.h>
#include <numeric>
@ -40,6 +41,11 @@ PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
calc_fee = false;
}
if (!utxo.IsNull() && utxo.scriptPubKey.IsUnspendable()) {
result.SetInvalid(strprintf("PSBT is not valid. Input %u spends unspendable output", i));
return result;
}
// Check if it is final
if (!utxo.IsNull() && !PSBTInputSigned(input)) {
input_analysis.is_final = false;