From f6d21d9b1bb79d63ea069c84c4a1578ad0e88182 Mon Sep 17 00:00:00 2001 From: priyanshiiit Date: Mon, 27 Jun 2022 16:00:40 +0530 Subject: [PATCH] lntest: adds test for previous outpoints --- lntest/itest/lnd_recovery_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lntest/itest/lnd_recovery_test.go b/lntest/itest/lnd_recovery_test.go index ce9cc7991..fe1f629ed 100644 --- a/lntest/itest/lnd_recovery_test.go +++ b/lntest/itest/lnd_recovery_test.go @@ -199,6 +199,18 @@ func testOnchainFundRecovery(net *lntest.NetworkHarness, t *harnessTest) { fn(node) } + // Check if the previous outpoints are set correctly. + req := &lnrpc.GetTransactionsRequest{ + StartHeight: 0, + EndHeight: -1, + } + txDetails, err := node.GetTransactions(ctxb, req) + require.NoError(t.t, err) + + for _, tx := range txDetails.Transactions { + require.Greater(t.t, len(tx.PreviousOutpoints), 0) + } + // Lastly, shutdown this Carol so we can move on to the next // restoration. shutdownAndAssert(net, t, node)