bitcoinj-sv
bitcoinj-sv copied to clipboard
Payment channels
I assume you run some tests so maybe this is wrong.
My understanding is that the refund transaction is provided ahead of the funding transaction, and the server does not have the funding transaction. This would mean that the v1 handling call to getConnectedOutput()
would return null and the v1 payment channel process would error at this point. The v2 handling, well, as I understand it that uses P2SH so can be removed.
https://github.com/bitcoin-sv/bitcoinj-sv/blob/f1bb6617d14eefa395d7d761691ce4ae098cf3c9/wallet-and-tests/src/main/java/org/bitcoinj/moved/protocols/channels/PaymentChannelV1ServerState.java#L161