Commit Graph

379 Commits

Author SHA1 Message Date
Joost Jager
ba3fa94268
lnrpc+routing: Only accept a single route for SendToRoute 2019-05-15 11:54:46 +02:00
Joost Jager
7a5bd29a69
lnrpc+routing: remove k shortest path finding 2019-05-07 19:54:06 +02:00
Johan T. Halseth
c4415f0400
Merge pull request #3044 from cfromknecht/spelling-fixes
multi: fix spelling mistakes
2019-05-07 08:50:36 +02:00
Conner Fromknecht
17b2140cb5
multi: fix spelling mistakes 2019-05-04 15:35:37 -07:00
Olaoluwa Osuntokun
a8fa4094ba
Merge pull request #3027 from Roasbeef/new-onion-structs
router+build: update to the latest version of lightning-onion
2019-05-03 13:30:41 -07:00
Joost Jager
5d2de91241
config: update broadcast delta to reduce risk of channel force close 2019-05-03 12:22:30 +02:00
Olaoluwa Osuntokun
2f2a907b58
test: update itest to no longer expect incorrect message for sphinx replay test
In this commit, we update the itests to expect the correct message for
the sphinx replay test. Before the fixes in the prior commits, we
expected the wrong error since we were actually unable to decrypt these
converted malformed HTLC errors. Now, we'll properly return a parse able
error, so we assert against that error instead of the failure to decode
an error.
2019-04-30 20:13:40 -07:00
Olaoluwa Osuntokun
b44556fa8a
Merge pull request #1926 from halseth/lnd-package
Move daemon from main to lnd package
2019-04-25 17:52:19 -07:00
Olaoluwa Osuntokun
7ba1344468
Merge pull request #3007 from halseth/lnd-test-balance-flake
lnd_test: check Dave's balance in WaitNoErr
2019-04-24 17:05:12 -07:00
Olaoluwa Osuntokun
d32db4a813
Merge pull request #2956 from halseth/complete-payment-request-wait-for-update
[lnd_test] wait for state update in completePaymentRequests
2019-04-24 17:04:06 -07:00
Johan T. Halseth
ab327dc8c1
lnd_test: check Dave's balance in WaitNoErr
Resolves a flake.
2019-04-24 09:01:38 +02:00
Johan T. Halseth
b53899c43c
lnd: rename package main->lnd 2019-04-23 20:57:33 +02:00
ccdle12
c46457fb5b
rpcserver+lnd_test: adding check in SendCoins to prevent txs sent to pubkeys 2019-04-20 10:12:20 +08:00
Johan T. Halseth
7528e7de8b
lnd_test: wait for state update in completePaymentRequests
Instead of sleeping, we wait for at least one update to one of our
channels. This to make sure the HTLC has actually been committed.
2019-04-15 15:01:54 +02:00
Conner Fromknecht
fd80866627
lnd_test: bump timeout for darwin builds 2019-04-11 16:26:11 -07:00
Conner Fromknecht
5b3170d542 lnd_test: apply AsyncBenchmarkTimeout to async_payments_benchmark
It was mistakenly only applied to async_bidirectional_payments, which
can also see timeouts due to darwin fsync performance regression.
2019-04-11 15:54:21 -07:00
Conner Fromknecht
f19a6a0ba2
lnd_test: use WaitNoError when testing num singles in...
export_channel_backup. Fixes a local flake hit reliably on darwin.
2019-04-10 19:23:08 -07:00
Conner Fromknecht
caa0e2f0b8
Merge pull request #2879 from joostjager/outgoing-go-to-chain
htlcswitch: revert forwarding policy block delta requirements
2019-04-05 15:45:30 -07:00
Olaoluwa Osuntokun
46aa8503b2
Merge pull request #2892 from wpaulino/verify-chan-backup
rpc: modify VerifyChanBackup to take either a Single or Multi
2019-04-05 14:31:37 -07:00
Wilmer Paulino
b71bb9400a
rpc: modify VerifyChanBackup to take either a Single or Multi 2019-04-05 12:51:16 -07:00
Joost Jager
ab4da0f53d
cnct: define separate broadcast delta for outgoing htlcs
This commits exposes the various parameters around going to chain and
accepting htlcs in a clear way.

In addition to this, it reverts those parameters to what they were
before the merge of commit d1076271456bdab1625ea6b52b93ca3e1bd9aed9.
2019-04-05 11:36:07 +02:00
Conner Fromknecht
8f5ddf39ca
lnd_test: use child harness chan backup restore cases
This prevents a panic during test failure due to a child test calling
FailNow on a parent test context. The sub tests now capture the
testing.T object provided in each closure as opposed to ignoring it and
using the parent context.
2019-04-04 02:36:32 -07:00
Olaoluwa Osuntokun
893cff60c4
Merge pull request #2839 from joostjager/htlc-expiry-check
link: increase expiry grace delta for exit hop and forwarded htlcs
2019-04-01 18:15:56 -07:00
Olaoluwa Osuntokun
f2160273b7
test: add new series of itests for various SCB restore scenarios
In this commit, we add 4 new itests for exercising the SCB restore
process via 4 primary scenarios: recover from backup using RPC, recover
from file using RPC, recover channels during init/creation, recover
channels during unlock. With all fields populated there're a total of 24
new scenarios to cover. At the time of authoring of this commit, the
other scenarios (bits are: initiator, updates, private) have been left
out for now, as they increased the run time of the integration tests
significantly.
2019-03-28 17:54:15 -07:00
Olaoluwa Osuntokun
e3029dee45
test: add new itest for exporting SCBs 2019-03-28 17:54:13 -07:00
Olaoluwa Osuntokun
266ddbaceb
test: add new test for streaming SCB updates 2019-03-28 17:54:12 -07:00
Olaoluwa Osuntokun
acc37f7449
test: refactor testDataLossProtection to extract core DLP scenario out to new func
In this commit, we modify the core testDataLossProtection test to
extract the primary DLP assertion logic into a new function. We do this,
as the upcoming SCB tests will fallback to this test after some initial
set up.
2019-03-28 17:54:11 -07:00
Olaoluwa Osuntokun
e3626d1af9
lntest: update to new RestoreNodeWithSeed API 2019-03-28 17:54:09 -07:00
Olaoluwa Osuntokun
ea6ed7b8d2
test: update to new getChanPointFundingTxid
In this commit, we update all uses of the `getChanPointFundingTxid` to
match the new function signature. We no longer need to convert to a
chainhash.Hash, as the method does so underneath now.
2019-03-28 17:54:08 -07:00
ccdle12
abfbdf6aec rpcserver: check for compatible network in SendCoins
lnd_test: adding address validation for send coins

The commit adds a test that checks that when a user calls sendcoins, the
receiving address is validated according to the current network. If the
address is not compatible with the current network, it will return an
error to the user.

rpcserver: adding a check for compatible network in SendCoins

This commit adds a check in SendCoins that checks whether the receiving
address is compatible with the current network.

Fixes #2677.
2019-03-28 16:42:44 -07:00
Olaoluwa Osuntokun
341f5e4329
Merge pull request #2846 from cfromknecht/lntest-darwin-timeouts
lntest/timeout: split into darwin and non-darwin timeouts
2019-03-28 16:14:38 -07:00
Conner Fromknecht
f3f4093ef0
lntest/timeouts: split into darwin and non-darwin timeouts 2019-03-27 19:00:39 -07:00
Conner Fromknecht
6e61ee2710
lnd_test: use one timeout context per AddInvoice 2019-03-27 19:00:27 -07:00
Olaoluwa Osuntokun
cddbf19aa2
Merge pull request #2759 from Roasbeef/cltv-lower-default
lnd: lower default CLTV delta from 144 to 40
2019-03-27 17:10:08 -07:00
Joost Jager
cd535b9401
link: increase expiry grace delta
This commit increase the expiry grace delta to a value above the
broadcast delta. This prevents htlcs from being accepted that would
immediately trigger a channel force close.

A correct delta is generated in server.go where there is access to
the broadcast delta and passed via the peer to the links.

Co-authored-by: Jim Posen <jim.posen@gmail.com>
2019-03-26 18:42:00 +01:00
Conner Fromknecht
8baa6d6601
lnd_test: test disable is sent during close 2019-03-12 17:34:42 -07:00
Olaoluwa Osuntokun
c302f1ea3a
lnd: lower default CLTV delta from 144 to 40
In this commit, we lower the default CLTV delta from 144 (1 day) to 40
blocks (~7 hours). We do this as the initial value was purposefully very
high, and was only in place as place holder in earlier versions of the
software. Such a high value can also discourage path finding algorithms
from taking lnd paths due to the negative impact of CLTV value in widely
deployed heuristics.
2019-03-11 18:43:37 -07:00
Olaoluwa Osuntokun
f3215e0a3f
Merge pull request #2610 from halseth/trivial-itest
Small integration test fixes
2019-02-21 16:32:01 -08:00
Joost Jager
d67b1962a8
lnd_test: remove unkeyed field references 2019-02-21 13:47:58 +01:00
Conner Fromknecht
ef41fc6249
lnd_test: set valid chan status config flags 2019-02-14 17:13:21 -08:00
Conner Fromknecht
4686db4196
config+server+lnd_test: expose chan status manager config options
Exposes the three parameters that dictate
the behavior of the channel status manager:
 * --chan-enable-timeout
 * --chan-disable-timeout
 * --chan-status-sample-interval
2019-02-14 17:13:11 -08:00
Olaoluwa Osuntokun
932fafd7cd
lnd_test: extend on chain recovery test to assert utxos 2019-02-11 13:02:00 -08:00
Johan T. Halseth
aefc23938c
lnd_test: assert num channels before state check
Since the getChanInfo call would require the node to have only one
channel, it made no sense to check the number of channels after calling
it.

Instead we check it first, giving the node time to restart.
2019-02-07 15:42:55 +01:00
Johan T. Halseth
b19b26003b
lnd_test: disable mempool check on justice tx rebroadcast
By mistake we were checking that only one transaction was in the mempool
when looking for the justice tx, which wasn't always the case, and would
make the test fail.
2019-02-07 15:41:02 +01:00
Johan T. Halseth
81b2e3502e
lnd_test: convert assertNumOpenChannelsPending to use waitNoError 2019-02-07 15:38:47 +01:00
Johan T. Halseth
3f3656ae4a
lnd_test: assert htlc sweep is mined
To ensure the sweep has properly propagated to the miner and included in
the mined block.
2019-02-07 15:37:49 +01:00
Valentine Wallace
b826101aae lnd_test: alter basic channel creation test to test chan subscription.
Because the integration tests are already long-running, it is preferable to
add testing for the RPC channel update subscription to an existing test rather
than adding additional tests.
2019-02-05 18:18:06 -08:00
Joost Jager
55aee9c703
cnct: expose non-incubating htlcs after channel force close
In this commit we fix a reporting gap that previously existed for htlcs
that were still contested.
2019-02-01 09:36:47 +01:00
Conner Fromknecht
9d20ca4a51
Merge pull request #2495 from halseth/itest-dont-shadow-prederr
[trivial] lnd_test: don't shadow predErr
2019-01-31 18:26:11 -08:00
Olaoluwa Osuntokun
b1b42dcfae
test: update error propagation test for new onion error change
In this commit, we update the error propagation test to ensure that the
proper HTLC amount is included for the `CodeUnknownPaymentHash` error.
2019-01-29 23:03:42 -08:00