Repository: bitcoin
Issue: `combinepsbt` RPC does not work with P2TR inputs
Labels: Bug,PSBT

[`combinepsbt`](https://bitcoincore.org/en/doc/24.0.0/rpc/rawtransactions/combinepsbt/) allows to distribute identical PSBTs to peers for signature and consolidate the resulting PSBT. However, this does not work with taproot UTXOs for me.

**Expected behavior**

Combined PSBT should return `'complete': True` if all inputs are signed in different PSBTs and finalized with `finalizepsbt`

**Actual behavior**

Unable to finalize the transaction that was combined from multiple signed PSBTs.

**To reproduce**

PSBT 1

```
cHNidP8BAP2uAQIAAAAFx31XtYDPBwcoApG/qyvysMHW1mSKoF8kbyPn7EcUsOIAAAAAAP3///8tdEqDo/vSgTbsEpxTyuKF1wRlLqYaZsIRXLzqNkUWnwEAAAAA/f///4ywsdbrtM1Y3UiwdHkmWhN+iLKmY+ydhXWQMtzPQ5L9AAAAAAD9////ZliKNCp8zVXttzwP9KwaQxax9NophK/7E+2qE8dbrmYBAAAAAP3////rLIyyvsaYUJG/oUCfvasbCcwYt9RZYAK5s1sMQ9KpmwEAAAAA/f///wV4QQ8AAAAAACJRIMWp5VMEe1PO4vb4CmutZuMORkSggAdvQ+oD8E9EQ3OdeEEPAAAAAAAiUSCmUymUNVrg6qi94R9eEOTHPxQLDH4G7x673nJMyaxEcnhBDwAAAAAAIlEgLWHMAQo44IHU+Oaz60NKkUhvvkFjqE35QwCZhvzjJH54QQ8AAAAAACJRIKxKBxMRn+90Tr16E4Pa7SHmzL1JOj1CMCJi669o8EJQeEEPAAAAAAAiUSBxoo82RZw5zBgJJxAqrqJmVltCQ18+8hMUZgE2eUi+/QAAAAAAAQB9AgAAAAHKRUAzcxXq/mW3+qkNncaCNTAgRyTP4PEEC0FDlwj23AAAAAAA/v///wJAQg8AAAAAACJRIH/ARsdmingov+t3LNl2tXXodV43ysMejuJx1ZNPT4+iH7gs41AGAAAWABRXCzdXUGWLm7WNsjPayTxzBhIdGu4GAgABAStAQg8AAAAAACJRIH/ARsdmingov+t3LNl2tXXodV43ysMejuJx1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EF+C/Rd7O94ox8aQG5WmG1ntH34WgjwghByv75/sBFyZyxBfgv0XezveKMfGkBuVphtZ7R9+FoI8IGQAzz9POVgAAgAEAAIAAAACAAAAAAAoAAAAA
 ```

**System information**

Bitcoin Core v24.0.1 and all the above PSBTs are for Signet