Commit Graph

241 Commits

Author SHA1 Message Date
Conner Fromknecht
5660a26b60
rpcserver: add wallet sync check to OpenChannel 2020-03-31 10:21:24 -07:00
Oliver Gugger
c4f20dada4
lntest: test PSBT channel funding 2020-03-31 10:00:12 +02:00
Olaoluwa Osuntokun
0b59ded7ca
Merge pull request #4073 from joostjager/anchor-sweep-itest
lntest/itest: select anchor commitment format and sweeping itests
2020-03-27 13:23:02 -07:00
yyforyongyu
4be1a4d0ec multi: fix typos 2020-03-27 16:59:18 +08:00
Joost Jager
8628a989a6
itest: enable anchor commitment for multi-hop test
These tests exercise the different ways of sweeping a commitment, so
we'll cover the modified scripts used for anchor commitments and
spending the anchor itself by both parties.

Co-authored-by: Johan T. Halseth <johanth@gmail.com>
2020-03-27 08:01:52 +01:00
Joost Jager
23c81949cc
itest: enable anchor type for force close test
Co-authored-by: Johan T. Halseth <johanth@gmail.com>
2020-03-27 08:01:50 +01:00
Joost Jager
714166eeb0
itest: enable anchor type for basic funding flow
Co-authored-by: Johan T. Halseth <johanth@gmail.com>
2020-03-27 08:01:48 +01:00
Johan T. Halseth
e269e3f91b
itest: calcStaticFee based on commit type 2020-03-27 08:01:46 +01:00
Joost Jager
7dbb936791
lntest/itest: use helper functions in calcStaticFee 2020-03-27 08:01:44 +01:00
Joost Jager
0e8eb40625
lntest/itest: add mempool tx utility functions 2020-03-27 07:42:05 +01:00
Joost Jager
863966bac9
lntest/itest: fix scope bug
Fixes a subtle bug where the outer scope predErr was hidden when the
return value of findForceClosedChannel was stored in a newly
defined variable with the same name.
2020-03-27 07:41:59 +01: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
770c80635c
lntest: give async payments enough time to complete 2020-03-24 10:00:59 +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
b4ea34037a
lntest: move multi-hop root test case and common utils to own file 2020-03-23 11:19:18 +01:00
Johan T. Halseth
1ade912361
itest: run multi-hop claim tests for all commit types 2020-03-23 11:16:29 +01:00
Johan T. Halseth
6ed0c83d11
itest: spin up new nodes for multi-hop tests
This will let us set their commitment type for the subtest.
2020-03-23 11:13:27 +01: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
Wilmer Paulino
bed485f0a9
Merge pull request #3194 from halseth/listpayments-test-on-chain-settle
[integration tests]: restart Alice after on-chain settle
2020-01-28 17:29:23 -08: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
Johan T. Halseth
80ad0fdd5c
lntest: restart Alice after on-chain settle
To ensure lnd is able to pick up an on-chain preimage properly after a
restart, we suspend Alice and check that the payment is listed correctly
as succeeded after a restart.
2020-01-20 14:01:19 +01:00
Johan T. Halseth
bb619352be
lntest: check payment status settled after claim test 2020-01-20 13:55:13 +01:00
Conner Fromknecht
51dbdd3b38
multi: rename key_send, key-send and key send to keysend 2020-01-16 18:37:16 -08:00
Olaoluwa Osuntokun
79948ebe1c
Merge pull request #3854 from matheusdtech/fix-hn-goroutine-leak
lntest: Don't leak node's grpc conn
2020-01-06 17:55:41 -08: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
ae1f7348f0
lntest: fix macaroon paths
This change makes sure that all macaroons are stored in the same
folder. This makes it possible to use the lntest package in external
projects that use loop's lndclient library which currently assumes
that the admin macaroon and subserver macaroons are in the same sub
folder of lnd's data directory.
2020-01-03 09:19:18 +01: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
Oliver Gugger
b762d441cf
lntest: expose configuration of harness node
When using the lntest package for itests in external projects, it
is necessary to access a harness node's configuration, for example
to get its data directory on disk. This commit exports that
configuration.
2020-01-03 09:13:29 +01:00
Joost Jager
4273bc0ba2
lntest/itest: add key send test 2019-12-23 21:51:27 +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
Olaoluwa Osuntokun
be4db0ebca
lntest: add optional FundingShim field to OpenChannelParams 2019-12-20 19:09:48 -08:00