Sniped test and alternative to #18220
Sjors documenting the issue:
A PSBT signed by ColdCard was analyzed as follows (see [#17509](/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.