Commit Graph

254 Commits

Author SHA1 Message Date
Joost Jager
98e75b486d
itest: add db backend flag 2021-07-05 10:10:02 +02:00
Joost Jager
387f1ef274
lntest: abstract db backup and restore 2021-07-05 09:20:19 +02:00
yyforyongyu
310e923170
itest: use require inside net.EnsureConnected/net.ConnectNodes 2021-06-29 01:41:48 +08:00
Olaoluwa Osuntokun
e62f0e1f3a
Merge pull request #5429 from Roasbeef/itest-recovery-shutdown
lntest: retry node shutdown attempts to recovery tests
2021-06-24 18:43:39 -07:00
Olaoluwa Osuntokun
5bd84e2a60
lntest: retry node shutdown attempts to recovery tests
In #5364 we added a new error path in the `StopDaemon` method to return
an error if shutdown was attempted while a rescan/recover instance was
in progress. Since the wallet actually won't fully stop (atm)
mid-recovery, the call effectively didn't do anything in that scenario,
so we started to return an error to properly reflect that. However this
causes certain itests to fail, as during recovery, the stop attempt will
fail leading to the test itself failing.

In this commit, we wrap the calls to stop a running daemon within a
`wait.NoError` call so we'll continually try to shut down the daemon
rather than quit on the first try.

Fixes #5423.
2021-06-24 15:37:32 -07:00
yyforyongyu
54ed6c271b
itest: silence depreciation warnings 2021-06-23 20:35:28 +08:00
yyforyongyu
319cc533a6
itest: fix make lint 2021-06-23 20:35:28 +08:00
yyforyongyu
e10bd84a4f
itest: moving routing related tests into one file 2021-06-23 20:35:23 +08:00
Olaoluwa Osuntokun
2fd75ace9d
Merge pull request #5374 from yyforyongyu/itest-use-require-sendcoin
itest: use require inside net.SendCoins
2021-06-18 14:12:39 -07:00
yyforyongyu
6515c575bd
itest: use require inside net.SendCoins
This commit refactored the function SendCoins to take a new *testing.T
so the unexpected error is handled inside it.
2021-06-10 01:29:22 +08:00
yyforyongyu
b42bb87c81
itest: use require inside net.NewNode
This commit refactored the function NewNode to take a *testing.T so that
the unexpected error is checked inside it. The caller is now free from
checking the errors.
2021-06-09 02:14:37 +08:00
yyforyongyu
a60db53a5a
itest: fix wrong node queried for balance 2021-06-03 19:55:25 +08:00
Oliver Gugger
8147b270d4
lntest: wait for chain sync in switch test 2021-05-10 16:46:28 +02:00
Andras Banki-Horvath
dd14947154
lint: silence depreciation warnings 2021-05-04 17:33:14 +02:00
Andras Banki-Horvath
e5f249ad51
mod: integrate latest btcwallet and bump protobuf and grpc 2021-05-04 17:33:09 +02:00
Wilmer Paulino
f26cfac440
itest: use wait predicate for balance assertion in assertDLPExecuted
This assertion would at times fail if the wallet balance hadn't been
updated yet.
2021-04-29 13:56:20 -07:00
Johan T. Halseth
a2a61a104f
itest: make sendAndAssertSuccess take context 2021-04-27 09:47:23 +02:00
carla
2e39edd6bd
itest/test: add test for expired hold invoices
This commit adds a test for a hold invoice which is accepted
off-chain, and held by the recipient until it expired and
the payer force-closes the channel. With this test we
demonstrate two bugs in our handling of hold invoice state
in the invoice registry when we expire on chain:
- Htlcs not updated: even when we've timed out, we don't
  update the htlc state accordingly.
- Invoice can be settled: the invoice can be settled even
  though it's expired on chain.
2021-04-23 08:19:51 +02:00
Conner Fromknecht
748265d097
Merge pull request #5207 from carlaKC/4727-singleinvoice
invoicesrpc: terminate SubscribeSingleInvoice once invoice reaches a final state
2021-04-14 15:32:53 -07:00
carla
7f1e0a4d7b
itest/test: move test hold persistence into its own file 2021-04-14 09:19:21 +02:00
yyforyongyu
a215c55186
itest: add logging for subtests 2021-04-14 12:30:19 +08:00
yyforyongyu
1be7331c4f
itest: move funding tests into one file 2021-04-07 02:40:06 +08:00
Wilmer Paulino
983f402369
itest: add wallet import cases 2021-04-05 15:41:12 -07:00
Wilmer Paulino
a620ce3682
build: update btcd and btcwallet dependencies 2021-04-05 15:41:04 -07:00
Olaoluwa Osuntokun
a9afd86a5b
Merge pull request #5127 from alexbosworth/patch-15
rpcserver: revert target conf to previous behavior
2021-03-24 16:53:17 -07:00
Alex Bosworth
069de38186
itest: add support for specifying chain fee rate 2021-03-22 13:08:38 -07:00
carla
d0e7164c07
routerrpc: add mission control import 2021-03-18 10:51:45 +02:00
Wilmer Paulino
022d44f776
itest: test new channel update rate limiting options 2021-03-16 12:08:18 -07:00
Elliott Jin
215bf637ea itest: add test for new UpdateChanStatus RPC 2021-02-24 07:13:29 -08:00
Elliott Jin
ce2796257e multi: move GetChanPointFundingTxid from lnd to lnrpc
This refactor-only change makes the GetChanPointFundingTxid helper
function available from sub-systems outside of the root lnd package.
2021-02-24 07:13:28 -08:00
Olaoluwa Osuntokun
7b0ea3c029
Merge pull request #4909 from carlaKC/mc-paramsapi
routing: allow runtime updates to mission control config
2021-02-10 18:51:53 -08:00
Conner Fromknecht
58e924ad1c
discovery: don't historical sync when NumActiveSyncers == 0
Currently when numgraphsyncpeers=0, lnd will still attempt to perform
an initial historical sync. We change this behavior here to forgoe
historical sync entirely when numgraphsyncpeers is zero, since the
routing table isn't being updated anyway while the node is active.

This permits a no-graph lnd mode where no syncing occurs at all.
2021-02-10 09:35:45 -08:00
carla
63bdd6b07b
itest: add coverage for hold invoices with hop hints
This PR updates the hold invoice itest to create a private
channel, and sets the private option on the invoices created
to add coverage for the addition of hop hints.
2021-02-08 09:19:21 +02:00
Conner Fromknecht
227fd45da2
lntest: fix linter errors 2021-01-29 01:37:37 -08:00
Conner Fromknecht
e42301dee2
lntest: call markGraphSynced from gossipSyncer
Rather than performing this call in the SyncManager, we give each
gossipSyncer the ability to mark the first sync completed. This permits
pinned syncers to contribute towards the rpc-level synced_to_graph
value, allowing the value to be true after the first pinned syncer or
regular syncer complets. Unlinke regular syncers, pinned syncers can
proceed in parallel possibly decreasing the waiting time if consumers
rely on this field before proceeding to load their application.
2021-01-29 00:19:48 -08:00
Conner Fromknecht
920eda26fc
lntest/graph_top: test pinned syncers 2021-01-29 00:19:48 -08:00
Conner Fromknecht
ba67f3ecaa
lntest/graph_top: remove dependence on net.Alice/Bob 2021-01-29 00:19:47 -08:00
carla
64dad77e2e
multi: add get and set mission control to routerrpc 2021-01-19 10:57:15 +02:00
Johan T. Halseth
01f31e436a
itest: fix node names out of bounds
If the last channel fails, the indexing into nodeNames would panic. We
instead name the channels, such that the slices will be of the same
length.
2021-01-14 20:55:32 +01:00
eugene
caa0f5da6a multi: move and export funding-related vars to funding package
Also moves the lnd global MaxFundingAmount to server.go
2020-12-17 09:36:34 -05:00
Johan T. Halseth
413ece2ccc
itest: account for capped anchor commit fee rate in balance calc 2020-12-15 19:54:50 +01:00
Johan T. Halseth
42c51b662a
itest/channel_force_close test: handle HTLCs going through sweeper
Now that the HTLC second-level transactions are going through the
sweeper instead of the nursery, there are a few things we must account
for.
1. The sweeper sweeps the CSV locked HTLC output one block earlier than
   the nursery.
2. The sweeper aggregates several HTLC second levels into one
   transaction. This also means it is not enough to check txids of the
   transactions spent by the final sweep, but we must use the actual
   outpoint to distinguish.
2020-12-10 14:24:21 +01:00
Johan T. Halseth
241e21a0d1
itest: use hex encoded hash in error message 2020-12-10 14:24:18 +01:00
Oliver Gugger
9de659ea4f
itest: use require.Eventually where tick speed matters
To not waste a lot of time with the adjusted longer tick interval, we
use a short interval with require.Eventually where we can save some
time.
2020-12-08 21:40:37 +01:00
Oliver Gugger
cdcbc0376d
lntest: replace hard coded timeouts
This commit replaces most of the hard coded 10, 15, 20 and 30 second
timeouts with the default timeout. This should allow darwin users to
successfully run the parallel itests locally as well.
2020-12-08 21:37:12 +01:00
Oliver Gugger
36756c012d
lntest: use nextAvailablePort for miner and btcd backend
With the new btcd version we can specify our own listen address
generator function for any btcd nodes. This should reduce flakiness as
the previous way of getting a free port was based on just picking a
random number which lead to conflicts.
We also double the default values for connection retries and timeouts,
effectively waiting up to 4 seconds in total now.
2020-12-03 11:30:23 +01:00
Oliver Gugger
2edc3cf98f
multi: update to latest btcd version
With this commit we update btcd to the latest version which allows us to
specify the btcd binary we want to use when spinning up a new node.
2020-12-03 11:30:22 +01:00
Oliver Gugger
0a4962a18e
itest: run sub itests correctly
To avoid the "Error outside of test" log and to properly terminate the
test if a sub test fails, we need to correctly invoke them using the
RunTestCase method.
2020-12-01 22:24:03 +01:00
Olaoluwa Osuntokun
94f8311667
Merge pull request #4782 from cfromknecht/anchor-wtserver
watchtower: anchor channel support
2020-11-30 17:49:32 -08:00
Olaoluwa Osuntokun
7e298f1434
Merge pull request #3367 from cfromknecht/batched-graph-updates
Batched graph updates
2020-11-25 18:40:40 -08:00