Commit Graph

10644 Commits

Author SHA1 Message Date
Oliver Gugger
e6c47294fb
itest: fix typo and formatting 2020-11-04 11:03:36 +01:00
Oliver Gugger
ea4bb5dc5c
itest: fix chanbackup restore flake
Updating the fee of the mock estimator _after_ starting carol turned out
to be flaky and could lead to the new fee not being picked up in time
for the force close. That lead to carol not cpfp'ing the force closed
transaction.
2020-11-04 11:03:34 +01:00
Oliver Gugger
d4068e9892
travis+make: execute test groups in parallel 2020-11-04 11:03:33 +01:00
Oliver Gugger
ca7564e4b4
itest: add flags for lnd executable 2020-11-04 11:03:31 +01:00
Oliver Gugger
f358a4474d
lntest: add log dir flag 2020-11-04 11:03:30 +01:00
Oliver Gugger
9bbf134237
itest: split tests into dynamic tranches 2020-11-04 11:03:29 +01:00
Oliver Gugger
891eb0d63d
lntest: use nextAvailablePort for bitcoind 2020-11-04 11:03:27 +01:00
Oliver Gugger
5c04449dfd
lntest: use nextAvailablePort for fee service 2020-11-04 11:03:26 +01:00
Oliver Gugger
a50d337e42
lntest: lower initial port, add ApplyPortOffset function
To allow running multiple test tranches in parallel, we need a way to
make sure the TCP ports don't collide. We'll work with offsets for the
ports, using a different offset for each tranche.
2020-11-04 11:03:25 +01:00
Johan T. Halseth
a6d2263569
htlcswitch: add PermanentFailure to LinkFailureError 2020-11-04 10:50:28 +01:00
Oliver Gugger
eaf60a63e3
docs: update in-place rescan section 2020-11-04 09:12:24 +01:00
Oliver Gugger
a7c81eb595
lnd: drop wallet transactions if flag is set
To force a full chain rescan, the wallet can now be instructed to drop
its full transaction history on startup.
2020-11-04 09:12:24 +01:00
Oliver Gugger
37817f192e
config: add reset-wallet-transactions flag 2020-11-04 09:12:24 +01:00
Oliver Gugger
d0c3666310
mod: update to latest btcwallet dep 2020-11-04 09:12:19 +01:00
Olaoluwa Osuntokun
fbb430ad82
Merge pull request #4703 from wpaulino/is-synced-timestamp-inconsistency
btcwallet: return chain best timestamp while backend is syncing
2020-11-03 17:35:27 -08:00
Olaoluwa Osuntokun
297c614126
Merge pull request #4701 from carlaKC/4581-removeexperimential
multi: remove experimential build flag for assumechanvalid
2020-11-03 17:34:50 -08:00
Olaoluwa Osuntokun
21b9f24d28
Merge pull request #4675 from champo/sphinx_interceptor
htlcswitch,rpc: expose onion blob for intercepts
2020-11-03 17:30:21 -08:00
Daniel Babbev
fd544e00ee
docs: update C# documentation 2020-11-03 17:29:55 -08:00
Olaoluwa Osuntokun
cf5c670a2b
Merge pull request #4627 from matheusdtech/sigabrt
signal: do not trap SIGABRT
2020-11-03 17:25:16 -08:00
positiveblue
5089cfc1be aezeed: fix mnemonic word validation
A user complained about getting a misleading error after a typo in the
mnemonic. The word was `hear` and it passed the check even when it is
not in the list of valid words.

The reason is that we where checking if the word is in the variable
`englishWordList` (which includes all the words) instead of checking if the
variable is in the `defaultWordList` (which is basically `englishWoldList`
split by spaces). That means that `hear` passed the check because `heart`
appears in the list.

Related issue [4733](https://github.com/lightningnetwork/lnd/issues/4733)
2020-11-02 23:25:50 +01:00
Juan Pablo Civile
033c5b7a3f htlcswitch,rpc: expose onion blob for intercepts 2020-10-31 14:09:52 -03:00
Eugene
225390ab5b
Merge pull request #4487 from Crypt-iQ/cc_pkg_0723
chainreg: new chainreg package
2020-10-30 06:07:26 -04:00
Johan T. Halseth
ce17c3be96
Merge pull request #4268 from matheusdtech/itest-off-by-one
itest: fix off-by-one mining while waiting for CSV-encumbered outputs
2020-10-30 09:03:38 +01:00
Conner Fromknecht
4adb8123af
Merge pull request #4693 from joostjager/listchannels-circuits
lnrpc: expose linked htlcs in ListChannels
2020-10-29 12:52:34 -07:00
Conner Fromknecht
165212d965
Merge pull request #4635 from githorray/patch-1
remove lncli bash completion for unsupported address type p2pkh
2020-10-29 12:47:11 -07:00
Eugene
9571088756 lnd: log errors for ChainControl when shutting down 2020-10-29 15:24:17 -04:00
Eugene
bebe258e2d chainregistry+lnd: moving chainregistry+chainparams to new package 2020-10-29 15:24:14 -04:00
Eugene
46ef212de4 lnd+lncfg: move normalizeNetwork to lncfg 2020-10-29 15:20:00 -04:00
Eugene
4d238cfa2f lnd: export ChainControl, ChainRegistry 2020-10-29 15:20:00 -04:00
Eugene
cbdea57d52 chainregistry.go: export default values
This is needed so that git sees a subsequent commit as a code move.
2020-10-29 15:19:58 -04:00
Eugene
f4fe76aaf1 chainreg: add Config, move chainparams.go
Creates a Config that initializes the chainregistry struct in the
lnd package. Also moves all of chainparams.go to the chainreg
package.
2020-10-29 15:19:58 -04:00
Eugene
933b959aa8 chainreg: export ChainCode to new pkg
Moves chainCode from the lnd package to the chainreg package,
where it is exported and can be used by other packages.
2020-10-29 15:19:57 -04:00
eugene
afb6ad295e lnd: move initNeutrinoBackend to lnd.go 2020-10-29 15:19:56 -04:00
András Bánki-Horváth
9c9ce15ca6
Merge pull request #4708 from bhandras/expiry_watcher_opt
invoices: reduce heap usage when starting the expiry watcher
2020-10-29 10:15:35 +01:00
Matheus Degiovani
835c73632b
itest: fix off-by-one mining tests
This fixes tests that were surfaced as flaky.  Usually these tests had
an off-by-one error when mining blocks while waiting for a
CSV-encumbered output.
2020-10-28 14:48:15 -03:00
Oliver Gugger
8b32285f48
Merge pull request #4721 from guggero/itest-flake-hunt
itest: cleanup and flake fix
2020-10-28 17:05:06 +00:00
Andras Banki-Horvath
478cf704be
invoices: reduce heap usage when starting the expiry watcher 2020-10-28 16:26:47 +01:00
Oliver Gugger
098598ec74
itest: sort error whitelist 2020-10-28 14:35:11 +01:00
Oliver Gugger
fd684a8ffa
itest: add new errors to whitelist 2020-10-28 14:35:10 +01:00
Oliver Gugger
34439fbc2a
itest: cleanup multi-hop tests
As a preparation to fix an issue with the mempool wait, we clean up the
multi-hop itests a bit. We fix the formatting, use the require library
for assertions consistently and simplify some of the wait predicates.
Commonly used code is also extracted into functions.
2020-10-28 13:38:04 +01:00
Oliver Gugger
d1b46211d8
itest: replace WaitForTxBroadcast with WaitForTxInMempool 2020-10-28 13:29:18 +01:00
Oliver Gugger
1714394add
itest: fix send payment flake
In some cases the router isn't yet fully aware of all newly opened
channels. We need to give it some time to process the updates. Therefore
we add a wait for sending payments to give it a few more changes to
catch up.
2020-10-28 13:22:48 +01:00
Oliver Gugger
e6b0141b10
itest: fix typos, formatting 2020-10-28 13:22:48 +01:00
András Bánki-Horváth
dc16869d72
Merge pull request #4725 from halseth/chaneventstore-race
chanfitness/chaneventstore:  stop ticker after goroutine
2020-10-28 11:26:30 +01:00
Oliver Gugger
ac16bd0fe3
Merge pull request #4699 from matheusdtech/failing-link-flake
itest: Fix flakes when payments cause chan closure
2020-10-28 09:10:35 +00:00
Johan T. Halseth
c1705a28da
chanfitness/chaneventstore: stop ticker after goroutine
Stop the ticker after the goroutine reading from it has exited, to avoid
triggering the race detector.
2020-10-27 12:29:05 +01:00
Matheus Degiovani
16a4687718
itest: Fix flakes when payments cause chan closure
This fixes itest flakes that happen when a payment is attempted that
ends up causing a channel closure.

completePaymentRequests() attempts to monitor the open channels after a
payment is attempted in order to identify that payment was actually
dispatched to a remote node before returning.

However, when the payment actually causes a channel closure (for
example, because the receiver sent an incorrect preimage) this logic
fails in that the channel will no longer the found in the list of open
channels. This could cause a flake when there was enough time for the
channel to close before performing the check.

One example of such a flaky test is failing_link.

This fixes the issue by also checking whether the total number of
channels was reduced, which indicates (assuming itest operations are
being executed serially) that one of the attempted payments affected at
least one channel.
2020-10-27 08:07:49 -03:00
Oliver Gugger
747bd674dc
Merge pull request #4716 from matheusdtech/fix-itest-comment
itest: Sync nodes to chain during singleHop tests
2020-10-27 09:36:46 +00:00
Matheus Degiovani
473f730eec
itest: Sync nodes to chain during singleHop tests
This ensures the Carol and Dave nodes created in the single_hop series
of tests are synced to the latest chain tip generated by the miner
before creating the route that will eventually be used for payments.

This prevents a flake during CI tests where slow processing of blocks by
Carol could cause the generated route to have a final CLTV delta too
short for Dave to accept.

While at it, we switch the test to use the default CLTV delta provided
by QueryRoutes which is now the global default CLTV.
2020-10-26 16:29:39 -03:00
Oliver Gugger
9e4cfa0182
Merge pull request #4718 from yyforyongyu/fix-rpc-format
trivial: fix make rpc-format
2020-10-26 08:40:00 +00:00