psbt: AnalyzePSBT set next to"finalizer" when all inputs need finalizing #18220

pull Sjors wants to merge 1 commits into bitcoin:master from Sjors:2020/02/analyze_psbt changing 2 files +11 −6
  1. Sjors commented at 10:31 AM on February 28, 2020: member

    A PSBT signed by ColdCard was analyzed as follows (see #17509 (review))

    {
      "inputs": [
        {
          "has_utxo": true,
          "is_final": false,
          "next": "finalizer"
        }
      ],
      "estimated_vsize": 141,
      "estimated_feerate": 1e-05,
      "fee": 1.41e-06,
      "next": "signer"
    }
    

    I changed AnalyzePSBT so that it returns "next": "finalizer" instead.

  2. Sjors cross-referenced this on Feb 28, 2020 from issue gui: save and load PSBT by Sjors
  3. fanquake added the label PSBT on Feb 28, 2020
  4. Sjors renamed this:
    psbt: AnalyzePSBT set next to FINALIZER when all inputs need finalizing
    psbt: AnalyzePSBT set next to"finalizer" when all inputs need finalizing
    on Feb 28, 2020
  5. Sjors cross-referenced this on Feb 28, 2020 from issue "PSBT Operations" dialog by gwillen
  6. instagibbs commented at 3:16 PM on February 28, 2020: member

    Can you explain the code path master is hitting? Mind sharing the PSBT? :)

  7. Sjors commented at 3:23 PM on February 28, 2020: member

    Just try with a ColdCard simulator, it's pretty reproducible. On master result.next is set to SIGNER because only_missing_sigs is checked before only_missing_final. The latter is set to true along with the input being marked as FINALIZER.

    The reason master doesn't check only_missing_final first is that it starts as false and can be toggled to true for any input. So I reversed that to starting true and being toggled to false if any input is not final.

  8. instagibbs commented at 3:31 PM on February 28, 2020: member

    If it's really easy to set up I think a checked in test is in order

  9. [psbt] AnalyzePSBT: set next to FINALIZER when all inputs need finalizing
    Previously the next step would be SIGNER if all of the inputs had FINALIZER as their next step.
    64a44dc25c
  10. Sjors force-pushed on Feb 28, 2020
  11. Sjors commented at 3:57 PM on February 28, 2020: member

    I added a test.

  12. instagibbs cross-referenced this on Feb 28, 2020 from issue Make AnalyzePSBT next role calculation simple, correct by instagibbs
  13. instagibbs commented at 4:28 PM on February 28, 2020: member

    I had such trouble understanding the function I decided a proper refactor of logic was in order: https://github.com/bitcoin/bitcoin/pull/18224

  14. Sjors closed this on Feb 28, 2020

  15. meshcollider referenced this in commit 1f886243e4 on Mar 2, 2020
  16. sidhujag referenced this in commit 24a43a9ab0 on Mar 2, 2020
  17. sidhujag referenced this in commit eaf7646859 on Nov 10, 2020
  18. bitcoin locked this on Feb 15, 2022

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-20 06:54 UTC