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.