Make AnalyzePSBT next role calculation simple, correct #18224

pull instagibbs wants to merge 1 commits into bitcoin:master from instagibbs:analyze_psbt_role_simple changing 2 files +15 −20
  1. instagibbs commented at 4:28 PM on February 28, 2020: member

    Sniped test and alternative to #18220

    Sjors documenting the issue:

    A PSBT signed by ColdCard was analyzed as follows (see [#17509](/github-metadata-backup-bitcoin-bitcoin/17509/) (comment))
    
    {
      "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.
    

    It makes it much clearer that the role has been decided before hitting the calc_fee block, and groups all state-deciding in one spot instead of 2.

    Note that this assumes that PSBT roles are a complete ordering, which for now and in the future seems to be a correct assumption.

  2. instagibbs cross-referenced this on Feb 28, 2020 from issue psbt: AnalyzePSBT set next to"finalizer" when all inputs need finalizing by Sjors
  3. Make AnalyzePSBT next role calculation simple, correct 1ef28b4f7c
  4. instagibbs force-pushed on Feb 28, 2020
  5. Sjors commented at 4:33 PM on February 28, 2020: member

    ACK 1ef28b4f7cfba410fef524def1dac24bbc4086ca, much nicer. Don't forget to document the bug fix.

  6. instagibbs commented at 4:36 PM on February 28, 2020: member

    @achow101 poing

  7. achow101 commented at 5:41 PM on February 28, 2020: member

    ACK 1ef28b4f7cfba410fef524def1dac24bbc4086ca

  8. DrahtBot added the label Tests on Feb 28, 2020
  9. fanquake added the label PSBT on Feb 28, 2020
  10. DrahtBot commented at 10:21 PM on February 28, 2020: contributor

    <!--e57a25ab6845829454e8d69fc972939a-->

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    <!--174a7506f384e20aa4161008e828411d-->

    Conflicts

    No conflicts as of last run.

  11. achow101 cross-referenced this on Feb 28, 2020 from issue gui: save and load PSBT by Sjors
  12. meshcollider merged this on Mar 2, 2020
  13. meshcollider closed this on Mar 2, 2020

  14. sidhujag referenced this in commit 24a43a9ab0 on Mar 2, 2020
  15. luke-jr referenced this in commit eda8c7ed5a on Mar 5, 2020
  16. MarkLTZ cross-referenced this on Apr 4, 2020 from issue Bitcoin PR tracking by MarkLTZ
  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