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:

     0A PSBT signed by ColdCard was analyzed as follows (see [#17509](/bitcoin-bitcoin/17509/) (comment))
     1
     2{
     3  "inputs": [
     4    {
     5      "has_utxo": true,
     6      "is_final": false,
     7      "next": "finalizer"
     8    }
     9  ],
    10  "estimated_vsize": 141,
    11  "estimated_feerate": 1e-05,
    12  "fee": 1.41e-06,
    13  "next": "signer"
    14}
    15I 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. Make AnalyzePSBT next role calculation simple, correct 1ef28b4f7c
  3. instagibbs force-pushed on Feb 28, 2020
  4. Sjors commented at 4:33 pm on February 28, 2020: member
    ACK 1ef28b4f7cfba410fef524def1dac24bbc4086ca, much nicer. Don’t forget to document the bug fix.
  5. instagibbs commented at 4:36 pm on February 28, 2020: member
    @achow101 poing
  6. achow101 commented at 5:41 pm on February 28, 2020: member
    ACK 1ef28b4f7cfba410fef524def1dac24bbc4086ca
  7. DrahtBot added the label Tests on Feb 28, 2020
  8. fanquake added the label PSBT on Feb 28, 2020
  9. DrahtBot commented at 10:21 pm on February 28, 2020: member

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

    Conflicts

    No conflicts as of last run.

  10. meshcollider merged this on Mar 2, 2020
  11. meshcollider closed this on Mar 2, 2020

  12. sidhujag referenced this in commit 24a43a9ab0 on Mar 2, 2020
  13. luke-jr referenced this in commit eda8c7ed5a on Mar 5, 2020
  14. sidhujag referenced this in commit eaf7646859 on Nov 10, 2020
  15. DrahtBot 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: 2024-11-23 06:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me