From ccaeeb964e70d266e2ed03de305bbfc83a8a8fb2 Mon Sep 17 00:00:00 2001 From: Oliver Gugger Date: Thu, 31 Jul 2025 15:03:06 +0200 Subject: [PATCH] itest: run normal FundPsbt test case in remote-signer mode This makes sure there is no general issue with running the pay-join FundPsbt test case in a remote signer setup. --- itest/lnd_psbt_test.go | 8 ++++++++ itest/lnd_remote_signer_test.go | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/itest/lnd_psbt_test.go b/itest/lnd_psbt_test.go index 6090784a0..7dd5af926 100644 --- a/itest/lnd_psbt_test.go +++ b/itest/lnd_psbt_test.go @@ -1060,6 +1060,14 @@ func testFundPsbt(ht *lntest.HarnessTest) { alice := ht.NewNodeWithCoins("Alice", nil) bob := ht.NewNodeWithCoins("Bob", nil) + runFundPsbt(ht, alice, bob) +} + +// runFundPsbt tests the FundPsbt RPC use case where we want to fund a PSBT +// that already has an input specified. This is a pay-join scenario where Bob +// wants to send Alice some coins, but he wants to do so in a way that doesn't +// reveal the full amount he is sending. +func runFundPsbt(ht *lntest.HarnessTest, alice, bob *node.HarnessNode) { // We test a pay-join between Alice and Bob. Bob wants to send Alice // 5 million Satoshis in a non-obvious way. So Bob selects a UTXO that's // bigger than 5 million Satoshis and expects the change minus the send diff --git a/itest/lnd_remote_signer_test.go b/itest/lnd_remote_signer_test.go index fd48df643..80f936dd0 100644 --- a/itest/lnd_remote_signer_test.go +++ b/itest/lnd_remote_signer_test.go @@ -328,6 +328,11 @@ func testRemoteSignerPSBT(ht *lntest.HarnessTest) { // that aren't in the wallet. But we also want to make // sure we can fund and then sign PSBTs from our wallet. runFundAndSignPsbt(ht, wo) + + // We also have a more specific funding test that does + // a pay-join payment with Carol. + ht.FundCoins(btcutil.SatoshiPerBitcoin, carol) + runFundPsbt(ht, wo, carol) }, }