From 7a05f076349648e2cc4b1ee33e26a461d79e2ee4 Mon Sep 17 00:00:00 2001 From: Matt Morehouse Date: Fri, 15 Jul 2022 18:32:05 -0500 Subject: [PATCH] itest: fix sign_psbt failure Ensure the wallet has synced the blockchain before attempting to spend funds. Prior to this fix, I get the following error: rpc error: code = Unknown desc = wallet couldn't fund PSBT: error creating funding TX: insufficient funds available to construct transaction --- lntest/itest/lnd_psbt_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lntest/itest/lnd_psbt_test.go b/lntest/itest/lnd_psbt_test.go index 0a4b5f76a..a2495ce75 100644 --- a/lntest/itest/lnd_psbt_test.go +++ b/lntest/itest/lnd_psbt_test.go @@ -1381,4 +1381,6 @@ func sendAllCoinsToAddrType(ctx context.Context, t *harnessTest, require.NoError(t.t, err) _ = mineBlocks(t, net, 1, 1)[0] + err = node.WaitForBlockchainSync() + require.NoError(t.t, err) }