Commit Graph

290 Commits

Author SHA1 Message Date
Joost Jager
d2f6140818
itest: extend whitelist 2020-05-20 17:24:36 +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
Olaoluwa Osuntokun
c2516d9352
Merge pull request #4286 from guggero/remove-global-cfg
multi: remove global cfg variable
2020-05-18 19:45:43 -07:00
Wilmer Paulino
db2589ee8d
itest: add disconnection error to whitelist 2020-05-18 16:14:31 -07: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
Conner Fromknecht
b6915d9fbf
Merge pull request #3892 from matheusdtech/fix-lingering-contract
contractcourt: fix lingering contract after local breach
2020-05-12 11:46:26 -07:00
Joost Jager
261588cc8e
itest: switch over to routerrpc.SendToRouteV2 2020-05-12 19:56:58 +02:00
Joost Jager
b6170788ea
routerrpc: add SendToRouteV2 that returns an HTLCAttempt message
Unify data structure with SendPayment/ListPayments.
2020-05-12 19:56:54 +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
Joost Jager
25a50b62fb
itest: extend whitelist 2020-05-12 09:13:41 +02:00
Joost Jager
e1e4c8ef6b
itest: extend whitelist 2020-05-08 13:40:31 +02:00
Joost Jager
c0da0675c1
itest: add error detection explanation 2020-05-08 13:40:29 +02: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
Olaoluwa Osuntokun
50ddb53e28
Merge pull request #4249 from joostjager/extend-itest-whitelist
itest: extend whitelist
2020-05-06 16:38:03 -07:00
Olaoluwa Osuntokun
4a90d55789
Merge pull request #4234 from carlaKC/htlcnotifier-unknownfailuredetail
routerrpc+lntest: add nil check for failure detail and add itest coverage
2020-05-06 16:31:43 -07:00
Joost Jager
6f153d6eaa
itest: extend whitelist 2020-05-06 21:21:51 +02:00
carla
18b0049e5e
lntest/test: add check for sweeps in ListSweeps for force close test 2020-05-06 09:25:44 +02:00
Joost Jager
b59c0e1349
itest: add SendPaymentV2 to whitelist 2020-05-04 23:42:57 +02:00
Joost Jager
542e1466b1
itest: case insensitive log errors check 2020-05-04 22:20:24 +02:00
Conner Fromknecht
315c56607c
Merge pull request #4161 from joostjager/itest-err-guard
itest: check for new errors in logs
2020-05-04 10:15:49 -07:00
carla
a93b55ddbf
lntest/test: add htlc events test to multi-hop error propagation 2020-05-04 10:18:55 +02:00
carla
5a172330d3
lntest/test: move multi-hop error propagation into its own file 2020-05-04 10:18:54 +02:00
carla
b608683c9b
lntest/test: test htlcnotifier stream for successful multi-hop payments 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
Andras Banki-Horvath
556e3525ea misc: fix error formatting in multiple files 2020-04-24 19:15:08 +02:00
Andras Banki-Horvath
2b729a78f3 lntest: fix ticker leak 2020-04-24 19:15:08 +02:00
Joost Jager
f6b2410011
routing+routerrpc: rename max_shards to max_parts
Don't introduce a new term and align with the P in MPP.
2020-04-22 14:49:19 +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
1307a96624
itest: check for new errors in logs 2020-04-20 14:02:23 +02:00
Joost Jager
969eecc7d2
routing+routerrpc+lncli: rename MaxHtlcs to MaxShards 2020-04-14 10:31:59 +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
35ebfcda9e
itest: create mpp test context 2020-04-09 08:20:54 +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