Commit Graph

137 Commits

Author SHA1 Message Date
Oliver Gugger
e73c9218d7
itest: add REST API tests 2020-06-17 08:35:51 +02:00
carla
97a843f3cd
walletrpc: add LabelTransaction rpc 2020-05-25 11:33:33 +02:00
Joost Jager
e201ed8106
itest: switch over to routerrpc.SendPaymentV2 2020-05-20 17:23:52 +02:00
Joost Jager
ca9c58aec9
Merge pull request #4183 from joostjager/sync-local-payment
htlcswitch: sync local payment hand-off to link
2020-05-20 11:23:15 +02:00
Joost Jager
c325bf8c57
htlcswitch: sync link hand-off
This commit extends the link with a new synchronous delivery point for
local UpdateAddHTLC messages. The switch method SendHTLC is updated to
use this delivery point and thereby becomes a synchronous call.

For MPP payments, synchronous hand-off is important. Otherwise the next
pathfinding round could start without the channel balance updated yet.
2020-05-20 08:03:48 +02:00
carla
d021eae392
itest: add label check to sweep coins test
Add a label to our sweep all coins itest and check that it is correctly
set.
2020-05-19 13:31:51 +02:00
Oliver Gugger
3b2188d689
multi: move exported items to lncfg 2020-05-14 14:37:51 +02:00
Joost Jager
1bd211a722
Merge pull request #4147 from joostjager/unify-pay-responses
router+routerrpc: unify sendtoroute and payment responses
2020-05-13 20:36:14 +02:00
Joost Jager
261588cc8e
itest: switch over to routerrpc.SendToRouteV2 2020-05-12 19:56:58 +02:00
Matheus Degiovani
d71a4ee033 contractcourt+itest: fix lingering pending channel after breach
This fixes an issue where the contract court could leave a completely
swept commit tx unresolved if it was swept by the remote party.

This could happen if (our) commit tx just published was actually a
previously revoked state, in which case the remote party would claim the
funds via a justice transaction.

This manifested itself in the testRevokedCloseRetribution integration
test where at the end of the test Bob was left with a pending channel
that never resolved itself.
2020-05-12 07:46:14 -03:00
Olaoluwa Osuntokun
3190437188
Merge pull request #4139 from carlaKC/lnrpc-listsweeps
lnrpc: add block height params to GetTransactions and add ListSweeps
2020-05-07 16:44:05 -07:00
carla
18b0049e5e
lntest/test: add check for sweeps in ListSweeps for force close test 2020-05-06 09:25:44 +02:00
carla
5a172330d3
lntest/test: move multi-hop error propagation into its own file 2020-05-04 10:18:54 +02:00
carla
578f6be0a1
lntest/test: move multi-hop payments test into own file 2020-05-04 09:47:01 +02:00
Joost Jager
d451ef4ee1
routerrpc: rename rpcs to SendPaymentV2 and TrackPaymentV2
The message in the response stream changed. Rename the calls themselves,
to prevent older applications from getting decode errors. Especially
troublesome is the case where the request is executed (send payment),
but the application can't read the outcome (payment sent or not?)
2020-04-21 20:36:58 +02:00
Joost Jager
06f73c0a66
lnrpc: remove deprecated payment path
Not applicable anymore on the payment level with multi-part sends.
2020-04-10 11:05:52 +02:00
Joost Jager
ef38f8f2c7
itest: log failure time 2020-04-09 08:20:58 +02:00
Joost Jager
af14f2e425
itest: add multi-part payment test
Co-authored-by: Johan T. Halseth <johanth@gmail.com>
2020-04-09 08:20:56 +02:00
Joost Jager
af4abe7d58
routing+routerrpc: notify full payment structures
This commit fixes the inconsistency between the payment state as
reported by routerrpc.SendPayment/routerrpc.TrackPayment and the main
rpc ListPayments call.

In addition to that, payment state changes are now sent out for every
state change. This opens the door to user interfaces giving more
feedback to the user about the payment process. This is especially
interesting for multi-part payments.
2020-04-08 09:26:33 +02:00
Olaoluwa Osuntokun
7e6f3ece23
Merge pull request #3960 from bitromortac/listpayments-pagination
channeldb+lnrpc+lncli: listpayments pagination support
2020-04-07 17:06:37 -07:00
Conner Fromknecht
f50649d21b
htlcswitch/link: remove overflow queue
This commit removes the overflowQueue from the link. We do so in order
to promote better UX for senders, so that HTLCs are failed faster when
the commitment is full. This gives the sender the opportunity to try
another, more open path, rather than perceive the HTLC as being stuck.

At the same time, we remove the total number of active goroutines in lnd
by a factor of N where N is the number of active channels.
2020-04-07 13:20:36 -07:00
bitromortac
97b759796d itest: fix comment in list_outgoing_payments test 2020-04-07 07:03:51 +02:00
Olaoluwa Osuntokun
e52c5df8ab
Merge pull request #4140 from carlaKC/lnrpc-pendingchannelinitiator
lnrpc: use initiator enum for pending channel open initiator
2020-04-06 15:46:46 -07:00
Olaoluwa Osuntokun
a8a0aaa214
Merge pull request #4143 from cfromknecht/open-channel-flakes
lntest/itest/lnd_test: wait when calling OpenChannel
2020-04-03 18:10:45 -07:00
Wilmer Paulino
f6ff3131d8
lntest/itest: add change address recovery case to onchain recovery test
This is mainly motivated by a now fixed bug in the wallet in which
change addresses could at times be created outside of the default key
scopes. Recovery only used to be performed on the default key scopes, so
ideally this test case would've caught the bug earlier.
2020-04-03 15:26:19 -07:00
carla
2ae61162db
lnrpc: move initiator enum out of close summary
Move enum out of CloseSummary struct for more general use. This does
not change the encoding of the enum, and will only cause compile time
errors for existing clients. This enum has not been included in a
release yet, so we can make this move without much disruption.
2020-04-03 11:26:11 +02:00
Conner Fromknecht
ae41623a91
lntest/itest/lnd_test: wait when calling OpenChannel
In #4130, OpenChannel was changed to assert that the wallet is fully
synced before allowing a channel open. This introduced flakes on travis,
which are resolved here by using a wait predicate when calling
OpenChannel.

Note there is one existing call that was not converted, because it is
interested in the returned error. This call does not have a wait
predicate surrounding it, but this shouldn't cause a flake because other
channels are opened earlier in the test that will have already waited
for the wallet to sync up.
2020-04-02 17:56:00 -07:00
Johan T. Halseth
fee5fd0093
itest: add testSendToRouteMultiPath
testSendToRouteMultiPath tests that we are able to successfully route a
payment using multiple shards across different paths, by using SendToRoute.

Co-authored-by: Joost Jager <joost.jager@gmail.com>
2020-04-02 19:31:23 +02:00
Johan T. Halseth
5adfc968df
routing/payment_lifecycle: return recorded errors
In preparation for MPP we return the terminal errors recorded with the
control tower. The reason is that we cannot return immediately when a
shard fails for MPP, since there might be more shards in flight that we
must wait for. For that reason we instead mark the payment failed in the
control tower, then return this error when we inspect the payment,
seeing it has been failed and there are no shards in flight.
2020-04-02 10:24:35 +02:00
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
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