Commit Graph

10407 Commits

Author SHA1 Message Date
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
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
yyforyongyu
2cb42594a9
trivial: fix make rpc-format 2020-10-25 18:51:42 +08:00
Eugene
426db548dd
Merge pull request #4651 from Crypt-iQ/zpay32_fuzz
fuzz/zpay32: add Decode/Encode fuzz tests.
2020-10-22 10:23:24 -04:00
eugene
bbe85f3c16 fuzz/zpay32: add Decode/Encode fuzz tests.
These can be expanded on in the future. Encoding is currently done
with a static key for test determinism.
2020-10-21 06:42:54 -04:00
Oliver Gugger
d12f76fd6d
Merge pull request #4626 from guggero/sample-conf-check
GitHub workflow: Check all command line flags are described in sample-lnd.conf
2020-10-16 13:12:22 +02:00
Oliver Gugger
7ea4caa635
github: add sample-lnd.conf to PR checklist 2020-10-16 08:53:16 +02:00
Oliver Gugger
ab4f1c3b5a
github+make: check all CLI flags are in sample-lnd.conf
We add a GitHub action to our workflow that makes sure all command line
flags of lnd that are available with the default build tags are
contained in the sample-lnd.conf file.
2020-10-16 08:53:16 +02:00
Oliver Gugger
96379f3503
sample-lnd.conf: remove extra whitespaces 2020-10-16 08:53:16 +02:00
Oliver Gugger
b555357f9b
sample-lnd.conf: add all flags without build tag
Because we'll add a check that enforces all command line flags that are
available with the default build tags to also be contained in the
sample-lnd.conf file, we first add all that currently are missing.
2020-10-16 08:53:15 +02:00
Eugene
9e75c3eade
Merge pull request #4682 from Crypt-iQ/fuzz_ret_1009
fuzz: change return values to 1 rather than 0 or -1
2020-10-14 16:07:54 -04:00
eugene
f82653cb06
fuzz: change return values to 1 rather than 0 or -1
This allows gofuzz to store the mutating input as coverage if it reaches
any new coverage, even if it didn't make it to the end of the test.
2020-10-13 15:17:57 -04:00
Johan T. Halseth
d26001a69a
Merge pull request #4688 from carlaKC/4686-paymenttimeout
lncli: allow configurable timeout in send payment
2020-10-13 13:06:47 +02:00
carla
0a76f87bd0
lncli: allow configurable timeout in send payment 2020-10-12 13:27:06 +02:00
Oliver Gugger
f98c74319c
Merge pull request #4617 from guggero/no-txindex-itest
itest: add bitcoind test without txindex enabled
2020-10-09 15:51:20 +02:00
Oliver Gugger
4dcdfd98bb
travis: add bitcoind test without txindex 2020-10-09 13:35:06 +02:00
Oliver Gugger
3e3618ae9a
lntest: add build flag for disabling txindex on bitcoind
We create a new build flag for running the bitcoind tests without the
txindex enabled. We don't want this to be the default so we use a
negated build flag.
2020-10-09 13:35:04 +02:00
Oliver Gugger
b7fc7c3dae
lntest: use extraArgs, fix linter issues 2020-10-09 13:35:02 +02:00
Oliver Gugger
43c2031fa8
lntest: extract common bitcoind code into own file
To prepare for running multiple tests on bitcoind with different options
each time, we extract the common code into its own file.
2020-10-09 13:35:00 +02:00
Oliver Gugger
902d7dd812
Merge pull request #4643 from guggero/make-fuzz
Add fuzzing commands to Makefile
2020-10-09 11:03:30 +02:00
Oliver Gugger
41d8d56354
gitignore: ignore fuzzing artifacts 2020-10-09 09:53:56 +02:00
Oliver Gugger
1a1a9a6744
mod: add auto-added go mod changes
When running the make DEPGET target for the go-fuzz binaries, this entry
is auto added, even though we don't have a direct reference to it in our
code. Not sure why this is needed in the first place.
2020-10-09 09:53:56 +02:00
Oliver Gugger
5189cb799a
make: add fuzz-build and fuzz commands 2020-10-09 09:53:55 +02:00
Oliver Gugger
916b75fd4e
Merge pull request #4680 from guggero/travis-bitcoind-speedup
Travis+GitHub: update bitcoind to 0.20.1, extract bitcoind binary from docker image to speed up download
2020-10-09 09:43:52 +02:00
Conner Fromknecht
33fe44f4ca
Merge pull request #4681 from guggero/itest-whitelist
itest: add error to whitelist
2020-10-08 17:19:57 -07:00
Oliver Gugger
e8253479d5
Travis+GitHub: update to bitcoind 0.20.1, remove cache
With this commit we use the same version of bitcoind in all tests and
also remove the caches for the binary as docker has its own cache.
2020-10-08 21:30:11 +02:00
Oliver Gugger
785e797ef8
scripts: install bitcoind binary from docker image
Because the bitcoind mirror is extremely slow, we spend at least 2 to 3
minutes of each bitcoind related test on just downloading the binary. We
can achieve the same result by just pulling the docker image and
extracting the binary from that.
2020-10-08 21:29:51 +02:00
Olaoluwa Osuntokun
7e1d825834
Merge pull request #4554 from Roasbeef/go-1-15
build: build and run CI against Go 1.15
2020-10-08 12:18:22 -07:00
Oliver Gugger
eb74011d5a
itest: add error to whitelist 2020-10-08 20:39:11 +02:00
Johan T. Halseth
22d7bb138c
Merge pull request #3131 from halseth/reliable-payments-switch-gc
[reliable payments] switch result store clean-up
2020-10-08 15:43:34 +02:00