Commit Graph

30 Commits

Author SHA1 Message Date
yyforyongyu
16bac64ecb
lntemp+itest: refactor testHoldInvoicePersistence 2023-01-16 16:49:17 +08:00
yyforyongyu
c1b3481354
lntemp+itest: refactor testEtcdFailover 2023-01-16 16:49:16 +08:00
Olaoluwa Osuntokun
8a18824851
Merge pull request #7243 from guggero/ghost-utxo-fix
wallet: fix ghost UTXOs not being detected
2022-12-13 20:00:31 -08:00
Matt Morehouse
b72993c9dd
lntemp: after mining, sync to latest block
Ensure active nodes are synced to the latest block mined.

There are two scenarios where they might not be synced to the correct
block even when SyncedToChain is true:
  1. The backend may have rejected a newly mined block (e.g., see
     #7241).
  2. The backend might not have fully processed the new blocks yet.

In either case SyncedToChain will (correctly) be true since the node is
indeed fully synced to the backend. This commit makes sure we detect
case 1 above, while making sure we continue to wait in case 2.
2022-12-12 09:06:51 -06:00
Oliver Gugger
2221d0ccb1
lntest+lntemp: add itest case for wallet rescan problem
In this commit we add a test that demonstrates the problem of ghost
UTXOs lingering in the wallet after a re-scan, even if they were spent.

NOTE: This test shows the incorrect behavior and will be adjusted in a
follow-up commit to show the correct behavior after patching the
btcwallet version.
2022-12-09 00:56:49 +01:00
yyforyongyu
29652d88ee
lntest: add itest for timestamp filters 2022-12-05 20:04:47 +08:00
yyforyongyu
84fd911b47
multi: fix make lint
Fixes new lint errors caught by the latest version.
2022-11-18 20:48:23 +08:00
yyforyongyu
e963506f7d
lntemp+itest: refactor testListPayments 2022-11-17 21:06:10 +08:00
yyforyongyu
7029698c16
lntemp+itest: refactor testGraphTopologyNotifications 2022-11-17 21:06:10 +08:00
yyforyongyu
cc1d5f5f8d
lntemp+itest: refactor testReconnectAfterIPChange 2022-11-17 21:05:35 +08:00
yyforyongyu
cd7f02c866
lntemp+itest: refactor testUpdateChannelPolicyForPrivateChannel 2022-11-17 20:58:06 +08:00
yyforyongyu
b579ed72d9
lntemp+itest: refactor testSendUpdateDisableChannel 2022-11-17 20:58:06 +08:00
yyforyongyu
22f8f83412
multi: refactor testUpdateChannelPolicy 2022-11-17 20:58:05 +08:00
yyforyongyu
21097feb85
multi: refactor testFundingPersistence
This commit refactors the test `testFundingPersistence`. In addition, it
also changes the old `OpenChannelAssertPending` method and adds a new
method `OpenChannelAssertStream` for clarity.
2022-11-17 20:29:52 +08:00
yyforyongyu
b1b989afae
lntemp+itest: refactor testAbandonChannel 2022-11-17 20:29:51 +08:00
yyforyongyu
ba61e9edff
itest+lntemp: refactor testMaxPendingChannels 2022-11-17 20:29:51 +08:00
yyforyongyu
5336c8e5f5
multi: refactor testSphinxReplayPersistence 2022-11-17 20:29:50 +08:00
yyforyongyu
f5ebaa5f35
multi: refactor testDisconnectingTargetPeer 2022-11-17 20:29:50 +08:00
yyforyongyu
14f45d0722
lntemp+lntest: fix make lint 2022-10-27 01:11:35 +08:00
yyforyongyu
ab62109865
lntemp+lntest: always wait for nodes sync after mining blocks
In this commit, we introduce two mining methods, `MineBlocks` and
`MineBlocksAndAssertNumTxes`, to `HarnessTest`. These methods are
different from the miner's methods as they would 1) mine the blocks
slowly and 2) assert all active nodes have synced. The miner's methods
are kept for future tests such as mining blocks really fast and see the
behavior of `lnd`.
2022-10-27 01:11:34 +08:00
yyforyongyu
3b250b294c
rpcserver+lntemp: add more error logs to PendingChannels
This commit adds error logs to `PendingChannels` and changes how we
assert the num of pending force close channels, see the docs for more
info.
2022-10-27 01:11:33 +08:00
yyforyongyu
6b5f4f407c
itest: refactor testMultiHopLocalForceCloseOnChainHtlcTimeout 2022-10-27 01:11:32 +08:00
yyforyongyu
d51f98efc6
itest: refactor testMultiHopReceiverChainClaim 2022-10-27 01:11:32 +08:00
yyforyongyu
5a7c6cea02
lntest+lntemp: refactor testMultiHopHtlcLocalTimeout 2022-10-27 01:11:32 +08:00
yyforyongyu
e8dc15dae4
lntemp: add supporting methods for testDataLossProtection 2022-10-27 01:11:31 +08:00
yyforyongyu
2966773018
lntemp: add more assertions and supporting methods 2022-10-27 01:11:31 +08:00
yyforyongyu
1d135c1409
lntemp: expand package to support testExternalFundingChanPoint 2022-10-27 01:11:30 +08:00
yyforyongyu
19981ac9bd
lntemp: expand package to support testBasicChannelFunding
This commit adds more supporting methods to support the test
`testBasicChannelFunding`.
2022-10-27 01:11:30 +08:00
yyforyongyu
cc69634a2e
lntemp: add more methods to support testUpdateChanStatus 2022-10-14 15:45:24 +08:00
yyforyongyu
a3fa4ba10a
lntemp: re-introduce HarnessTest as a test manager
This commit adds a new component, `HarnessTest`, as a test manager, which
is responsible for managing the state change in the itest. It is built
on top of `HarnessNode` and will be handling assertions so that a test
can be created without unnecessary attention to node's unwanted
failures. This commit also adds a minimal set of assertions.
2022-10-14 15:45:24 +08:00