diff options
Diffstat (limited to 'src/psbt.cpp')
-rw-r--r-- | src/psbt.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/psbt.cpp b/src/psbt.cpp index ef9781817a..10260740f0 100644 --- a/src/psbt.cpp +++ b/src/psbt.cpp @@ -214,6 +214,17 @@ bool PSBTInputSigned(const PSBTInput& input) return !input.final_script_sig.empty() || !input.final_script_witness.IsNull(); } +size_t CountPSBTUnsignedInputs(const PartiallySignedTransaction& psbt) { + size_t count = 0; + for (const auto& input : psbt.inputs) { + if (!PSBTInputSigned(input)) { + count++; + } + } + + return count; +} + void UpdatePSBTOutput(const SigningProvider& provider, PartiallySignedTransaction& psbt, int index) { const CTxOut& out = psbt.tx->vout.at(index); |