Can you leave comments on each step to make it clear what’s happening? It’s been a few minutes of staring and I’m not quite sure what’s exactly being tested here, making it difficult to update in the future.
My basic test flow would probably follow the lines of:
- pick a node that doesn’t have a wallet
- make a single wpkh utxo
- make single input psbt with that utxo
- make sure it signs it when expected, and finalizes when expected (e.g., give it a descriptor unrelated to the utxo, partial_signature lying around when expected, vary sighash modes)
- make sure extracted tx submits to mempool ok
imo we don’t need to re-test all of the descriptor logic that’s internal and hopefully already tested; we just want to check that the API here makes sense and pipes through. The 2-of-3 multisig, multi-input stuff just seems like a distraction.