Commit Graph

98 Commits

Author SHA1 Message Date
yyforyongyu
4be1a4d0ec multi: fix typos 2020-03-27 16:59:18 +08:00
Olaoluwa Osuntokun
d9bcd711d7
Merge pull request #3924 from guggero/itest-scrypt
itest: use fast scrypt options for aezeed, macaroons DB and wallet DB
2020-03-26 16:20:31 -07:00
Johan T. Halseth
8dc5a3c144
itest: wait for file writing in wait predicate 2020-03-24 12:18:42 +01:00
Oliver Gugger
a101c8eeed
lntest: fix timing issue with auto reconnect 2020-03-24 10:00:58 +01:00
Johan T. Halseth
8623bfac22
Merge pull request #4103 from halseth/itest-multi-hop-move
[itests] multi hop test move
2020-03-24 09:37:53 +01:00
Olaoluwa Osuntokun
625d62e007
lntest/itest: update external funding test to exercise frozen chans 2020-03-23 16:57:09 -07:00
Johan T. Halseth
1ce4abc0a9
itest: extract multi-hop tests into sub tests 2020-03-23 11:13:26 +01:00
Johan T. Halseth
5a0f2d004a
itest: update multi hop test case docs
To make clear whcih sweep scenarios are actually being tested
2020-03-23 11:11:25 +01:00
Johan T. Halseth
4b5d91d24d
itest: move multi hop tests to own files
PURE CODE MOVE.
2020-03-23 11:10:33 +01:00
Johan T. Halseth
d81c8bbda7
itest: run force closure test for all commit types
Now that the force closure test has been extracted, spin up new nodes
for each commit type, and ensure the test succeed for all types.
2020-03-23 11:10:31 +01:00
Johan T. Halseth
651bb09c25
itest: extract channel force closure test into subtest
To make it possible to run the for close test for multiple commit types,
we extract it into a subtest, where the two nodes get passed in.
2020-03-23 11:07:36 +01:00
Johan T. Halseth
538f3baac8
itest: print wrong balance in correct format 2020-03-23 11:05:40 +01:00
Joost Jager
d2b6472843
cnct: pre-confirmation anchor sweep
Start anchor sweep attempts immediately after the commitment transaction
has been published. This makes the anchor known to the sweeper and
allows the user to bump the fee on it to get their commitment
transaction confirmed in case the fee committed too is insufficient for
timely confirmation.
2020-03-18 12:26:55 +01:00
Olaoluwa Osuntokun
43323f98fa
lntest/itest: add itest for SCB file restore for anchor commitments
In this commit, we extend the current SCB recovery tests to also cover
the new anchor commitment type. We only add a single test that covers
the most common case to avoid needing to tests all cases for all
commitment types which is being done in a follow up PR.
2020-03-16 17:07:27 -07:00
Olaoluwa Osuntokun
3dda93e30d
Merge pull request #3821 from halseth/pluggable-anchors-lnwallet
[anchor] pluggable anchor commitments
2020-03-09 19:49:05 -07:00
Olaoluwa Osuntokun
cbef26b9f6
Merge pull request #3993 from guggero/unconfirmed-chanbackup
chanbackup: update on-disk backup file with unconfirmed channels
2020-03-09 17:18:23 -07:00
Johan T. Halseth
44756b5811
cfg: rename legacyprotocol to protocol
Since we are also going to use it for experimental new features.
2020-03-09 12:59:34 +01:00
Johan T. Halseth
51c5352ae4
itest: make commit type enum
To prepare for adding more commit types to test for basic channel
funding, we make the commit type an enum that gets its own set of
subtests.
2020-03-09 12:59:34 +01:00
Oliver Gugger
ab024b98ee
rpcserver+itest: remove channel from backup when abandoning it 2020-03-04 10:58:50 +01:00
Oliver Gugger
4e0c276154
rpcserver: don't skip pending channels in backup subscription
The synchronous call to get all channel backups also include
channels that are pending at the moment of the call. A previous
commit added pending channels to the file based backup as well. So
this is the last backup method that needs to be adjusted to also
contain unconfirmed channels.
2020-03-04 10:58:49 +01:00
Oliver Gugger
8a2c02f8ea
itest: test unconfirmed channel backup file 2020-03-04 10:58:49 +01:00
carla
b3e6395635
lntest: check close initiator in basic channel itest
Update channel updates and subscription itest to check that close
initiator is appropriately set for cooperative and force closes for the
local and remote party.
2020-02-21 13:53:57 +02:00
Hampus Sjöberg
227e66c469 rpc: Add PendingOpenChannel to SubscribeChannelEvents
This commit adds PendingOpenChannel to SubscribeChannelEvents stream in
the gRPC API.
This is useful for keeping track of channel openings that Autopilot does.
It can also be used for the non-initator side of a channel opening to keep
track of channel openings.
2020-01-24 13:48:18 +01:00
Olaoluwa Osuntokun
aab956471d
Merge pull request #3846 from guggero/lntest-node-config
itest: make harnesses usable in external projects
2020-01-06 17:52:16 -08:00
Oliver Gugger
ce711a1de7
lntest: specify lnd binary
Integration tests in external projects might not have the same folder
structure as lnd does. Therefore we want to allow the path to the
lnd itest binary to be configurable.
2020-01-03 09:17:23 +01:00
Joost Jager
bb1e2afc9f
lntest/itest: move single hop invoice test to separate file 2019-12-23 21:51:25 +01:00
Olaoluwa Osuntokun
3de3ec8008
lntest/itest: add new test for external chan point funding 2019-12-20 19:09:56 -08:00
Johan T. Halseth
aea902b788
Merge pull request #3847 from halseth/lnd-test-csv-flake
lnd test: fix csv mempool sweep time
2019-12-19 19:40:37 +01:00
Conner Fromknecht
396a978cec
lntest+wait: replace sleeps in assertAmountSent
This commit constructs a helper closure assertAmountSent that can be
reused by other functions. The closure returns an error so that it can
be used with wait.NoError or the new wait.InvariantNoError. The latter
is added since the predicate could otherwise pass immediately for the
sphinx_replay_persistence tests, but change shortly after. It also
rounds out the wait package so that we offer all combinations of
predicate and no-error style waits.
2019-12-18 23:57:12 -08:00
Johan T. Halseth
7044219f90
lnd test: fix csv mempool sweep time
Since CSV locked outputs specifies the first block where they are
allowed to be included, they can actually be added one block earlier
into the mempool.

This led to a flake, where the sweep tx was already in the mempool at
the time we mined the last block, causing the next mempool check to
fail.
2019-12-17 15:29:27 +01:00
Joost Jager
b2f43858c3
invoices: accept mpp payments 2019-12-11 16:14:49 +01:00
Conner Fromknecht
f3398c0c0e
Merge pull request #3789 from cfromknecht/coop-close-rpc-status
republish force and coop closes on startup
2019-12-05 10:35:53 -08:00
Conner Fromknecht
4c30f7d5de
Merge pull request #3719 from guggero/scb-unconfirmed-channels
chanbackup: encode broadcast height in chan ID for unconfirmed channels
2019-12-04 19:26:24 -08:00
Conner Fromknecht
0610578abb
lntest/itest/lnd_test: assert coop close chan status
This commit adds an itest assertion to check that a coop closed
channel's status is properly refelcted in list channels. We also fix a
race condition that prevented the rpc from being externally consistent
by marking the close sooner in the pipeline.
2019-12-04 14:25:29 -08:00
Oliver Gugger
a124bb24da
lntest: add unconfirmed channel SCB test 2019-11-28 08:59:38 +01:00
Olaoluwa Osuntokun
5bdb0d3d66
channeldb+lntest: code style fixes 2019-11-27 15:21:28 -06:00
Roei Erez
8b3dd9415e channeldb: refresh channel state within RefreshShortChanID
Refresh channel memory state whenever the short channel id is refreshed.
This is to make the in-memory channel consistent with the disk data.

Fixes #3765.
2019-11-27 15:10:00 -06:00
Conner Fromknecht
a83958408d
Merge pull request #3648 from cfromknecht/safe-disconnect
config+itest: allow unsafe disconnect by default
2019-11-22 21:07:17 -08:00
Olaoluwa Osuntokun
74849e7325
Merge pull request #3737 from guggero/resume-scb
chanbackup: continue recovery if channel already exists
2019-11-22 19:40:47 -08:00
Conner Fromknecht
4c5b251748
Merge pull request #3750 from halseth/itest-flake-replacement-forceclose
lnd_test: fix race condition on simultanous force closes
2019-11-22 13:59:31 -08:00
Olaoluwa Osuntokun
6f9fcfaccc
Merge pull request #3499 from cfromknecht/mpp-payments-rpc
channeldb+rpcserver: expose legacy payments as multi-path payments
2019-11-21 18:38:53 -08:00
Johan T. Halseth
08803e2e41
lnd_test: fix race condition on simultanous force closes
This fixes an issue that would lead to a flake during intergration
tests. Carol would start up with a outdated state and attempt to force
close the channel. At the same time she would connect to Dave,
triggering the dataloss protection. Dave would respond by force closing
the channel, and Dave transaction would in some cases have a higher fee,
resulting Carol's tx being replaced.

We fix this by suspending Dave until Carol's close tx is mined.
2019-11-21 13:43:29 +01:00
Johan T. Halseth
b1e6d9c5cf
Merge pull request #1152 from guggero/macaroon-integrationtest
itest: add tests for macaroon authentication
2019-11-21 09:22:28 +01:00
Olaoluwa Osuntokun
32965fd4be
rpc: update AbandonChannel to remove state from cnct, nursery and graph
In this commit, we update the `AbandonChannel` method to also remove the
state from the countract court as well as the channel graph. Abandoning
a channel is now a three step process: remove from the open channel
state, remove from the graph, remove from the contract court. Between
any step it's possible that the users restarts the process all over
again. As a result, each of the steps below are intended to be
idempotent.

We also update the integration test to assert that no channel is found
in the graph any longer. Before this commit, this test would fail as the
channel was still found in the graph, which can cause other issues for
an operational daemon.

Fixes #3716.
2019-11-20 17:42:58 -08:00
Oliver Gugger
570275435b
lntest: add SCB repeated restore test 2019-11-20 10:57:20 +01:00
Conner Fromknecht
e9eabed99c
lntest: assert mpp fields in listpayments 2019-11-19 20:41:58 -08:00
Conner Fromknecht
216b933d9b
config+itest: allow unsafe disconnect by default
This commit beings the process of deprecating unsafe-disconnect. Many
moons ago this was disallowed to prevent concurency bugs surrounding
reconnect. Despite the name, it has been safe to enable this feature for
well over a year, as several PRs have been merged that addressed the
possible issues that existed when the feature was added.
2019-11-19 20:13:04 -08:00
Conner Fromknecht
c9c7216768
lntest/itest: remove global alice and bob from disconnect test
This will allow us to start Alice and Bob with additional arguments once
we switch to making unsafe-disconnect true by default.
2019-11-19 20:12:29 -08:00
Conner Fromknecht
8e10da03c7
lntest/itest: move chanpoint instantiation down to where it's used 2019-11-19 20:12:07 -08:00
Oliver Gugger
543b258e30
lnd_test: add integration test for macaroon authentication 2019-11-14 16:34:52 +01:00