Commit Graph

5265 Commits

Author SHA1 Message Date
Conner Fromknecht
ab28db5b0d
chainntnfs/bitcoindnotify: disable height hints in testing 2018-08-26 15:34:05 -07:00
Conner Fromknecht
0e29a457e1
chainregistry: disable height hint cache 2018-08-26 15:32:10 -07:00
Conner Fromknecht
70ba3119b7
lnwallet/interface_test: run tests with disabled hint cache 2018-08-26 15:32:10 -07:00
Conner Fromknecht
12761a4f43
chainntnfs/interface_test: run tests w/ disabled cache 2018-08-26 15:32:10 -07:00
Conner Fromknecht
45a2c9aca8
chainntnfs/height_hint_cache_test: add tests for disabled cache 2018-08-26 15:32:09 -07:00
Conner Fromknecht
7df9ae0266
chainntnfs/height_hint_cache: add disable flag to hint cache 2018-08-26 15:32:06 -07:00
Olaoluwa Osuntokun
26f68da5b2
Merge pull request #1785 from Roasbeef/ensure-peer-quit
peer+server: ensure the peer is always able to quit even mid msgStream application
2018-08-25 18:24:12 -07:00
Olaoluwa Osuntokun
f2db18733b
peer: before and after obtaining link for chan update, check quit signal 2018-08-25 17:30:17 -07:00
Olaoluwa Osuntokun
13a6d413ac
discovery: select on peer's QuitSignal to allow caller to unblock if disconnecting
In this commit, we select on the peer's QuitSignal to allow the caller
to unblock if the peer itself is disconnecting. With this change, we now
ensure that it isn't possible for a peer to block on this method and
prevent a graceful exit.
2018-08-25 17:30:16 -07:00
Olaoluwa Osuntokun
19552b0dbf
htlcswitch+funding+discovery: update mock peers to add new QuitSignal method 2018-08-25 17:30:15 -07:00
Olaoluwa Osuntokun
7f480f723c
peer: add QuitSignal to ensure peer struct adheres to lnpeer.Peer interface 2018-08-25 17:30:14 -07:00
Olaoluwa Osuntokun
1364dca5a6
lnpeer: extend Peer interface with new QuitSignal method
In this commit, we extend the Peer interface with a new QuitSignal
method. This method is meant to expose a read-only quit channel which
will allow callers to cancel any actions based on the lifetime of the
underlying peer.
2018-08-25 17:30:13 -07:00
Olaoluwa Osuntokun
169cb723ce
build: update dep for golang.org/x/crypto to compile under golang 1.11 2018-08-25 17:30:12 -07:00
Olaoluwa Osuntokun
0e510c8b5c
funding+peer: don't attempt to deliver messages if the peer is shutting down 2018-08-25 17:30:11 -07:00
Olaoluwa Osuntokun
d6f534cfa5
peer: don't attempt to re-enable any private channels 2018-08-25 17:30:09 -07:00
Olaoluwa Osuntokun
745cc3a8f4
server: don't attempt to disable private channels 2018-08-25 17:30:08 -07:00
Olaoluwa Osuntokun
5130949604
peer: allow msgConsumers to also exit on peer quit send 2018-08-25 17:30:07 -07:00
Olaoluwa Osuntokun
33c5c9661e
peer: allow msgStream goroutines to quit within the apply function
In this commit, we thread through the quit of the peer to the execution
of the apply function for a msgStream. This change ensures that if the
target is still processing the message, then the peer is able to exit
cleanly and not block insensately.
2018-08-25 17:30:05 -07:00
Olaoluwa Osuntokun
0b5a403fce
funding: add caller quit channel to waitUntilChannelOpen
In this commit, we add a caller quit channel to waitUntilChannelOpen.
This ensures that the caller won't block forever if it needs to exit
before the funding manager exits, or the channel barrier is actually
closed.
2018-08-25 17:30:04 -07:00
Olaoluwa Osuntokun
e4e4a6ab58
peer: move atomic var increment in msgConsumer goroutine to defer
In this commit we move the atomic var increment that signals the
consumer goourtine has exited to the top of the method in a defer
statement. This cleans up some duplicate code and also adheres to the
pattern of using defers to signal cleaning up any dependent goroutine
state on exit.
2018-08-25 17:30:02 -07:00
Olaoluwa Osuntokun
a7656454aa
peer: stop chanMsg streams in defer right after creation 2018-08-25 17:29:59 -07:00
Olaoluwa Osuntokun
ce115a6a59 peer: raise readHandler wait group done to defer statement
In this commit, we raise the readHandler wait group done into a defer
statement at the top of the method. This fixes an existing but that
would cause the readHandler to declare it had exited, yet possibly still
be waiting on the chan message stream below to exit.
2018-08-24 18:53:28 -07:00
Olaoluwa Osuntokun
5cf911a762
Merge pull request #1764 from cfromknecht/isolate-fwdpkg-to-live-links
htlcswitch/link: only resovle+gc fwdpkgs for live channels
2018-08-24 17:42:44 -07:00
Olaoluwa Osuntokun
c41ea4818c
Merge pull request #1769 from cfromknecht/increase-fwdpkg-gc-test-interval
htlcswitch/test_utils: increase fwdpkg gc interval
2018-08-24 17:01:28 -07:00
Olaoluwa Osuntokun
d90b5992a3
Merge pull request #1778 from cfromknecht/txindex-proper-fallback
Txindex proper fallback
2018-08-24 14:50:39 -07:00
Conner Fromknecht
22793e4418
htlcswitch/link_test: increase fwdpkg gc interval
In this commit, we increase the fwdpkg gc interval
to avoid having it conflict with switch tests that
inspect forwarding packages. The current timeout is
a little too short on travis, and sporadically fails
TestChannelLinkCleanupSpuriousResponses, which was
added recently.
2018-08-24 12:54:24 -07:00
Conner Fromknecht
20ba489b4a
chainntnfs/interface: fix TxConfStatus godocs for linter 2018-08-24 11:29:09 -07:00
Johan T. Halseth
f82fd5fe86
chainntnfs/bitcoind: fallback to scan manually only in case of err != nil 2018-08-24 14:46:20 +02:00
Johan T. Halseth
01d8953737
chainntnfs/btcd: fallback to scan manually only in case of err != nil 2018-08-24 14:46:20 +02:00
Johan T. Halseth
31dc387e0f
chainntnfs/btcd+bitcoind tests: use common TxConfStatus 2018-08-24 14:46:20 +02:00
Johan T. Halseth
79b2ee7da5
chainntnfs/btcd+bitcoind: use common TxConfStatus 2018-08-24 14:46:20 +02:00
Johan T. Halseth
b552984fcd
chainntnfs: define common TxConfStatus type 2018-08-24 14:46:20 +02:00
Johan T. Halseth
89c33731fe
chainntnfs/bitcoind: remove unnecessary check for tx==nil 2018-08-24 14:46:20 +02:00
Johan T. Halseth
4a60887974
chainntnfs/btcd: remove unnecessary check for tx==nil 2018-08-24 14:46:19 +02:00
Johan T. Halseth
a91466e9fa
chainntnfs/bitcoind tests: check found mempool case 2018-08-24 13:51:54 +02:00
Johan T. Halseth
cb3ec07685
chainntnfs/test_util: set 10ms trickleInterval for miner 2018-08-24 13:50:47 +02:00
Conner Fromknecht
ecc91305ac
chainntnfs/btcdnotify: initialize with height hint cache 2018-08-24 04:05:46 -07:00
Conner Fromknecht
16a321f6c5
chainntnfs/bitcoind: initialize with height hint cache 2018-08-24 04:05:18 -07:00
Olaoluwa Osuntokun
85c0dd3de0
routing/chainview: update to latest API changes 2018-08-24 03:36:25 -07:00
Olaoluwa Osuntokun
9b6b78a932
chainntnfs/neutrinonotify: update to latest API changes 2018-08-24 03:36:25 -07:00
Olaoluwa Osuntokun
e718016464
build: update btcd+btcwallet+neutrino to latest versions 2018-08-24 03:36:25 -07:00
Wilmer Paulino
191c4f3e28
multi: enable txindex on miner harness 2018-08-24 03:36:25 -07:00
Wilmer Paulino
cb688de7ad
chainntnfs: guard test chain notifier under debug flag 2018-08-24 03:36:25 -07:00
Wilmer Paulino
7895f01e2e
chainntnfs: ensure proper fallback to scanning tx manually
In this commit, we address a bug where it's possible that we still
attempt to manually scan for a transaction to determine whether it's
been included in the chain even after successfully checking the txindex
and not finding it there. Now, we'll short-circuit this process by
exiting early if the txindex lookup was successful but the transaction
in question was not found. Otherwise, we'll fall back to the manual
scan.
2018-08-24 03:36:24 -07:00
Wilmer Paulino
f88f6f68d4
chainntnfs: extract helper test vars and functions
In this commit, we extract some of the helper test variables and
functions into their own file and guard them under a build flag. This is
needed as some unit tests will be introduced in a future commit where
most of the same functions within the interface tests are reused. In
order to prevent these variables and functions from being exportable, we
guard them by the "debug" build tag.
2018-08-24 03:36:24 -07:00
Olaoluwa Osuntokun
625b210f44
Merge pull request #1776 from cfromknecht/autopilot-add-node-trigger
[autopilot]: add OnNodeUpdate trigger
2018-08-23 20:35:34 -07:00
Olaoluwa Osuntokun
b9db220e8c
config: properly show list of sub-systems for show debuglevel
Fixes #1772.
2018-08-23 19:48:30 -07:00
Olaoluwa Osuntokun
de92dac6a8
lnwallet: fix logging message for fee floor 2018-08-23 19:38:13 -07:00
Olaoluwa Osuntokun
fa6a0a7ce9
lnwire: recognize required query sync feature bit 2018-08-23 19:36:17 -07:00
Olaoluwa Osuntokun
a1a6845fb5
Merge pull request #1731 from halseth/link-policy-persist
Correctly apply min_htlc to forwarding policy
2018-08-23 19:21:44 -07:00