Commit Graph

242 Commits

Author SHA1 Message Date
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
Conner Fromknecht
82a238317c lncfg+itest: expose configurable batch-commit-interval
This will permit a greater degree of tuning or customization depending
on various hardware/environmental factors.
2020-11-25 16:45:25 -08:00
Olaoluwa Osuntokun
4e079d1d20 lntest/itest: fix SendToRoute in UpdateChanPolicy test
It needs to include the MPP payload  now.
2020-11-25 16:32:15 -08:00
Olaoluwa Osuntokun
7fdf46ea4e lntest/itest: update SendToRoute tests to include payment addr 2020-11-25 16:32:09 -08:00
Conner Fromknecht
b28bbc3223 wtclinet+itest: expose anchor client via rpc + add itest 2020-11-25 16:16:47 -08:00
Andras Banki-Horvath
5f3b800630 lint: fix error reported by the linter 2020-11-18 15:34:46 +01:00
Andras Banki-Horvath
369ae5e372 itest: move all test db files when using both etcd and bbolt
In some tests we moved channeld.db to a temp location in order to
"time travel". This commit extends the existing semantics by moving all
files, including embedded etcd db too besides the channeld.db file.
2020-11-18 15:34:45 +01:00
Andras Banki-Horvath
98342433ab itest: add etcd flag to control if new lnd nodes should run on etcd 2020-11-18 15:34:44 +01:00
carla
887ff442db multi: fix verbose output for listsweeps and check all against wallet
Previously, the verbose output of listsweeps would fail if we did not
find some sweeps in our wallet's listtransactions output. This could be
the case for sweeps that were rbf-ed, so the endpoint would fail. This
commit also updates the listsweeps endpoint to always check against the
wallet, so that we do not return these discarded sweeps that never
confirmed.
2020-11-13 13:59:52 +02:00
Andras Banki-Horvath
979c8497b2 itest: add icase to node log filename + restart nodes before each icase
This commit adds the icase name to the log filename, to make it simpler
to find problematic tests. Additionally after this commit we'll restart
Alice and Bob (the base harness nodes) before each icase to start with a
clean state.
2020-11-12 09:17:52 +01:00
Andras Banki-Horvath
d6c2ee1bbf itest: use require.NoError in TestLightningNetworkDaemon 2020-11-12 09:17:47 +01:00
Oliver Gugger
47e8882480 make+itest: allow the same test to be run in parallel 2020-11-10 13:57:31 +01:00
Oliver Gugger
24adf475ce lnd_test: add integration tests for stateless init 2020-11-07 11:24:35 +01:00