Commit Graph

4820 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
917f929e70
keychain: use t.Helper() instead of manually fetching the line no from the runtime 2018-08-15 16:14:02 -07:00
Olaoluwa Osuntokun
1ff596ecd7
build: update btcwallet to point to latest version 2018-08-14 19:11:42 -07:00
Olaoluwa Osuntokun
26032f5956
channeldb: extend TestFetchClosedChannels to populate local chan cfg properly 2018-08-14 19:11:41 -07:00
Olaoluwa Osuntokun
cf06b041a4
keychain: extend TestKeyRingDerivation to check KeyLocators of derived keys 2018-08-14 19:11:41 -07:00
Olaoluwa Osuntokun
ad25ae1a07
keychain: ensure we properly set the KeyLocator for keys from DeriveNextKey
In this commit, we fix a slight bug in the existing implementation of
DeriveNextKey for btcwallet. Before this commit, we would only set the
public key, and not also the derivation path. It's important that we
also set the path information, as in the near future we'll be using the
KeyDescriptors returned from this method to create static channel back
ups. With these static backups, the key alone may be insufficient to
re-derive the private key as we may need to fallback to brute forcing in
order to re-derive the key as it's possible we add new key families in
the future.
2018-08-14 19:11:40 -07:00
Olaoluwa Osuntokun
e97e4c1f5d
contractcourt: set auxiliary chan recovery info for all created chan close summaries 2018-08-14 19:11:40 -07:00
Olaoluwa Osuntokun
c37c9db2de
funding: properly set auxiliary channel recovery info in close chan summaries 2018-08-14 19:11:40 -07:00
Olaoluwa Osuntokun
b06dabfcb9 lnwallet: properly set auxiliary channel recovery info in NewUnilateralCloseSummary
In this commit, we fix a slight bug by ensuring that the revocation info
at the final state of the channel, as well as the local chan config is
properly set within the channel close summary created within
NewUnilateralCloseSummary. Before this commit, for all cooperative close
transactions, this state would _only_ include the pubkey itself, which
in some cases may not be sufficient to re-derive the key if needed.
2018-08-14 19:11:18 -07:00
Olaoluwa Osuntokun
999f4a742c
Merge pull request #1460 from rawtxapp/lncli-confirm-payreq
Adds extra confirmation to payinvoice and sendpayment, can be bypassed by force.
2018-08-14 16:48:53 -07:00
Lightning Koala
fab1aa2d49 docs: Add tlsextraip + tlsextradomain to sample config (#1665) 2018-08-13 22:10:54 -07:00
Olaoluwa Osuntokun
7a113d469b
Merge pull request #1551 from cfromknecht/switch-revert-replace-link
[htlcswitch]: revert replace link, ensure removed links are stopped
2018-08-13 21:44:42 -07:00
Olaoluwa Osuntokun
5efc1229bf
Merge pull request #1439 from valentinewallace/historical-block-epoch-ntfns
Historical block epoch ntfns
2018-08-13 21:18:36 -07:00
Olaoluwa Osuntokun
35363ee9a8
Merge pull request #1725 from wpaulino/manual-fee-floor
rpcserver: enforce fee floor for fee rates input by the user
2018-08-13 21:03:37 -07:00
Wilmer Paulino
29efb02968
rpcserver: enforce fee floor for fee rates input by the user
In a previous commit, we modified our fee rates to be sat/kw internally
as it was possible that the estimated fee rate was not enough to
properly broadcast the transaction. To remedy this, we decided to add a
fee floor, but this would only be enforced when querying the fee
estimator. In this commit, we attempt to do the same thing, but for fee
rates input manually by the user.
2018-08-13 14:39:08 -07:00
Olaoluwa Osuntokun
72aa79692c
Merge pull request #1722 from halseth/chan-status-print
peer: print ChanStatus return value, not address
2018-08-12 20:56:47 -07:00
Valentine Wallace
fb7deac898
chaintnfs/interface_test: test notifiers handling missed blocks
Tests for the case where a chain backend skips a series of blocks, such that the notifier's best block is out of date. Also tests the case where a notifier's best block has been reorged out of the chain.
2018-08-11 22:45:25 -07:00
Valentine Wallace
dea22eb874
chainntnfs/interface_test: add test for client catchup on block ntfns
This tests the case where a client registers for block notifications with an outdated best block, to ensure that the client is properly caught up on the blocks that it has missed.
2018-08-11 22:45:17 -07:00
Valentine Wallace
f6ba64056a
chainntnfs/interface_test: utilize TestChainNotifier interface in tests
Switches all ChainNotifier parameters to be TestChainNotifiers. This allows access to the extra testing methods provided by the TestChainNotifier interface.
2018-08-11 22:45:17 -07:00
Valentine Wallace
b3a5b3b576
chainntnfs: add ChainNotifier test interface for test methods
TestChainNotifier wraps the ChainNotifier interface to allow adding additional testing methods with access to private fields in the notifiers. These testing methods are only compiled when the build tag "debug" is set. UnsafeStart allows starting a notifier with a specified best block.

UnsafeStart is useful for the purpose of testing cases where a notifier's best block is out of date when it receives a new block.
2018-08-11 22:45:03 -07:00
Johan T. Halseth
64c2c6b118
peer: print ChanStatus return value, not address 2018-08-11 12:51:50 +02:00
Conner Fromknecht
f84cd14b12
htlcswitch/switch: permit link shutdown mid-forwarding
In this commit, we thread through a link's quit channel into
routeAsync, the primary helper method allowing links to send
htlcPackets through the switch. This is intended to remove
deadlocks from happening, where the link is synchronously
blocking on forwarding packets to the switch, but also
needs to shutdown.
2018-08-10 11:42:26 -07:00
Conner Fromknecht
0fef1c71fe
htlcswitch/link: pass link quit to ForwardPackets 2018-08-10 11:42:26 -07:00
Conner Fromknecht
d08003b285
htlcswitch/link_test: adds TestChannelLinkShutdownDuringForward
This commit adds a test that verifies Stop does not block
if the link is concurrently forwarding incoming Adds to
the switch. This test fails prior to the commits that
thread through the link's quit channel.
2018-08-10 11:42:26 -07:00
Conner Fromknecht
ad68009ec5
chancloser: remove error returned from unregisterChannel 2018-08-10 11:42:25 -07:00
Conner Fromknecht
11f02de3b3
htlcswitch/link_test: removes unnecessary WaitForShutdown
The new RemoveLink method blocks until the link has
been fully stopped, so we no longer need to wait
for it explicitly.
2018-08-10 11:42:25 -07:00
Conner Fromknecht
b507d265b4
htlcswitch/link: only update contract signals on start if live link 2018-08-10 11:42:25 -07:00
Conner Fromknecht
5f90973f76
peer: always purge link before adding new one 2018-08-10 11:42:25 -07:00
Conner Fromknecht
a6e7b35872
server: use blocking RemoveLink to shutdown links 2018-08-10 11:42:25 -07:00
Conner Fromknecht
c78e81d32b
htlcswitch/switch: synchronous stop of links after removal 2018-08-10 11:42:25 -07:00
Conner Fromknecht
258019eb24
htlcswitch/switch_test: update reverted test to use...
current initialization methods
2018-08-10 11:42:24 -07:00
Conner Fromknecht
1113684dc3
Revert "htlcswitch: in event of duplicate link add, prefer newer link"
This reverts commit e60d2b774a35e446081f9be2d4901925cac05379.
2018-08-10 11:42:20 -07:00
Valentine Wallace
79cbea1c9c
chainntnfs: enable notifiers to catch up on missed blocks
This resolves the situation where a notifier's chain backend skips a series of blocks, causing the notifier to need to dispatch historical block notifications to clients.

Additionally, if the current notifier's best block has been reorged out, this logic enables the notifier to rewind to the common ancestor between the current chain and the outdated best block and dispatches notifications from the ancestor.
2018-08-10 01:08:58 -07:00
Valentine Wallace
3df5b26699
chainntnfs: notify clients after block connect has succeeded
This prevents the situation where we notify clients about a newly connected block, and then the block connection itself fails. We also want to set our best block in between connecting the block and notifying clients, in case a client makes queries about the new block they have received.
2018-08-10 01:08:58 -07:00
Valentine Wallace
cbf1799c40
chainntnfs: rewind chain on missed disconnected blocks
If the chain backend misses telling the notifier about a series of disconnected blocks, the notifier is now able to disconnect the tip to its new best block.
2018-08-10 01:08:57 -07:00
Valentine Wallace
a5e1cf9c97
chainntnfs: dispatch historical block ntfns to clients
If a client passes in their best known block when registering for block notifications, check to see if it's behind our best block. If so, dispatch the missed block notifications to the client.

This is necessary because clients that persist their best known block can miss new blocks while registering for notifications.
2018-08-10 01:08:57 -07:00
Valentine Wallace
02ee5650c8
chainntnfs/neutrino: add neutrino ChainConn implementation 2018-08-10 01:08:57 -07:00
Valentine Wallace
f4005175d8
chainntnfs/interface: add ChainConn interface
This allows notifiers to pass their chain backend into interface functions to retrieve information from the chain.
2018-08-10 01:08:57 -07:00
Valentine Wallace
d4cf271526
chainntnfs: track best block in btcd and bitcoind 2018-08-10 01:08:57 -07:00
Valentine Wallace
1ffc3bb82e
multi: update to latest RegisterBlockEpochNtfn interface 2018-08-10 01:08:57 -07:00
Valentine Wallace
71a81f59a9
chainntnfs: allow clients to pass in best block
Clients can optionally pass their best block known into RegisterBlockEpochNtfn. This enables the notifiers to catch up clients on blocks they may have missed.
2018-08-10 01:08:54 -07:00
Olaoluwa Osuntokun
6989316b11
Merge pull request #1717 from wpaulino/start-bitcoind-conn
chainregistry: correctly establish connection to bitcoind
2018-08-10 01:07:07 -07:00
Olaoluwa Osuntokun
536a381b4c
Merge pull request #1716 from cfromknecht/makefile-definition-order
Makefile: reorder definitions before include + proper tabbing
2018-08-10 00:57:46 -07:00
Wilmer Paulino
41379c9c73
docs: fix lnd w/ bitcoind backend example command 2018-08-09 23:54:47 -07:00
Wilmer Paulino
dae5382fd4
chainregistry: correctly establish connection to bitcoind
In this commit, we fix a bug recently introduced where we would
construct the parameters required to connect to a bitcoind backend, but
never actually started the connection.
2018-08-09 23:29:49 -07:00
Conner Fromknecht
05e55c44ce
Makefile: reorder definitions before include + proper tabbing 2018-08-09 23:24:55 -07:00
Olaoluwa Osuntokun
c520f89229
Revert "Makefile: run coverage tests with -tags=debug"
This reverts commit 8bb4337caca91aa7e9c96f1eb98a9e9582f42003.
2018-08-09 22:37:30 -07:00
Olaoluwa Osuntokun
f4849b051d
ticker: fix linter error 2018-08-09 22:15:41 -07:00
Olaoluwa Osuntokun
c35a701724
ticker: remove debug build tag from mock.go 2018-08-09 22:08:40 -07:00
Offer Markovich
da521c73f3 tests: ensure build halts if tests fail during coverage mode 2018-08-09 21:44:33 -07:00
Olaoluwa Osuntokun
61f5b3e3f1
Merge pull request #1709 from Empact/noisedial
Move noiseDial from config.go to server.go
2018-08-09 21:43:37 -07:00