mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-16 13:01:19 +02:00
pset: fix logic bug in analyzepsbt so that the "blinder" role may be returned
This commit is contained in:
parent
ec27e74f21
commit
048ca4a550
2 changed files with 2 additions and 2 deletions
|
|
@ -22,6 +22,7 @@ PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
|
|||
bool has_blinded_outputs = false;
|
||||
|
||||
result.inputs.resize(psbtx.inputs.size());
|
||||
result.next = PSBTRole::EXTRACTOR;
|
||||
|
||||
for (unsigned int i = 0; i < psbtx.inputs.size(); ++i) {
|
||||
PSBTInput& input = psbtx.inputs[i];
|
||||
|
|
@ -150,7 +151,6 @@ PSBTAnalysis AnalyzePSBT(PartiallySignedTransaction psbtx)
|
|||
}
|
||||
|
||||
// Calculate next role for PSBT by grabbing "minimum" PSBTInput next role
|
||||
result.next = PSBTRole::EXTRACTOR;
|
||||
for (unsigned int i = 0; i < psbtx.inputs.size(); ++i) {
|
||||
PSBTInputAnalysis& input_analysis = result.inputs[i];
|
||||
result.next = std::min(result.next, input_analysis.next);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue