Commit Graph

6517 Commits

Author SHA1 Message Date
eaea92e2cf Merge pull request #2589 from Roasbeef/skip-test-neutrino-notifier
chainntnfs: skip catch up re-org test for neutrino temporarily
2019-02-06 16:55:44 -08:00
d541ebe376 Merge pull request #2581 from solid-pay/patch-1
Add a links to KDF and BIP39
2019-02-06 16:53:41 -08:00
9c940746a7 rpc: fix regression in SendToRouteSync payment hash parsing
A recent change in this area of the codebase refactored some code to
make way for the deprecation of the streaming multi-route `SendToRoute`
method. Along the way, it removed the parsing of the `PaymentHashString`
field for the sync `SendToRouteSync` which is meant to be used via the
REST interface. In this commit, we fix this by populating _both_
`PaymentHash` and `PaymentHashString`. This is OK, as
`extractPaymentIntent` will check both values to extract the hex-encoded
payment hash if it's specified.
2019-02-06 15:48:23 -08:00
27cfdf944e Merge pull request #2457 from joostjager/cancelinvoice
invoices: CancelInvoice
2019-02-06 14:45:16 -08:00
4698d18294 fundingmanager: don't spew shortChanID
gives uneccessary output as

2019-02-06 11:26:45.338 [INF] FNDG: Announcing ChannelPoint(cf659a58d68f206531136bf19dea82863a488937f9f4c3d489c450ad81c1724e:0), short_chan_id=(*lnwire.ShortChannelID)(0xc000670a60)(1977:1:0)
2019-02-06 16:04:16 +01:00
a8baa23c2e lncli: add cancel invoice command 2019-02-06 07:29:38 +01:00
077852cd4e htlcswitch/test: test canceled invoice 2019-02-06 07:29:35 +01:00
f80fb286d8 htlcswitch/test: add two hop network 2019-02-06 07:29:32 +01:00
524d2465e0 htlcswitch/test: extract generic hop network 2019-02-06 07:29:29 +01:00
9cac0efab7 htlcswitch/test: create preparePayment function 2019-02-06 07:29:26 +01:00
e7907e0e7c htlcswitch/test: add waitForPaymentResult helper function 2019-02-06 07:29:24 +01:00
afd2d69906 htlcswitch/test: convert makePayment into function 2019-02-06 07:29:21 +01:00
1b87fbfab2 invoices+htlcswitch+lnrpc: cancel invoice 2019-02-06 07:29:18 +01:00
9cd88a04b7 Merge pull request #2516 from cfromknecht/wtclient-backup-task
watchtower: client justice transaction creation + blob encryption
2019-02-05 21:38:10 -08:00
07722e5db2 chainntnfs: skip catch up re-org test for neutrino temporarily
In this commit, we modify the main interface-level tests for neutrino to
skip the block catch up re-org test. We do this, as the test itself is
very unstable and only passes occasionally by the grace of RNGesus.
What's needed to ensure it passes reliably is to extend neutrino with a
cache of the last N blocks disconnected. Sample output of the affected
test when run:
```
   --- SKIP: TestInterfaces/neutrino_test_catch_up_on_missed_blocks_w/_reorged_best_block (0.00s)
        interface_test.go:1574: skipping re-org test for neutrino
```
2019-02-05 19:38:48 -08:00
c05a7c5c44 Merge pull request #1988 from valentinewallace/subscribe-chans-rpc
rpc: Add SubscribeChannels RPC.
2019-02-05 19:18:52 -08:00
e13d88f3f3 watchtower/wtclient/backup_task_internal_test: adds backupTask utests 2019-02-05 18:27:19 -08:00
8f98522f13 watchtower/wtclient/backup_task: adds backupTask 2019-02-05 18:27:13 -08:00
f1f52410ab sweep/input: adds NewBaseInput to return reference 2019-02-05 18:27:07 -08:00
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
ff0339a186 rpcserver: implement SubscribeChannels RPC call. 2019-02-05 18:18:06 -08:00
8b388b1301 lnrpc: add SubscribeChannels RPC & relevant messages to RPC protos. 2019-02-05 18:18:06 -08:00
10090a978d contractcourt/chain_arbitrator: notify the ChannelNotifier on newly closed channels. 2019-02-05 18:17:54 -08:00
bdd8ce14c9 switch: notify the ChannelNotifier on newly active/inactive channels. 2019-02-05 18:17:54 -08:00
f6cffa8f4b htlcswitch/link: add ChannelPoint() to retrieve the channel outpoint.
This function will be used in the switch to retrieve the channel point for a link,
allowing the switch to retrieve individual channels from the database.
2019-02-05 18:17:54 -08:00
5405028948 fundingmanager: inform ChannelNotifier about newly open channels. 2019-02-05 18:17:54 -08:00
cb26fd8a17 lnd: introduce the ChannelNotifier.
This commit introduces the channel notifier which is a central source
of active, inactive, and closed channel events.

This notifier was originally intended to be used by the `SubscribeChannels`
streaming RPC call, but can be used by any subsystem that needs to be
notified on a channel becoming active, inactive or closed.

It may also be extended in the future to support other types of notifications.
2019-02-05 18:17:54 -08:00
b0b6151cc1 rpcserver: add helper functions to format open and closed RPC channels.
`createRPCChannel` is used by the `listchannels` RPC call and will be
used by `subscribechannels` as well.
`createRPCClosedChannel` is used by the `closedchannels` RPC call and
will also be used by `subscribechannels`.

This is used by the `listchannels` RPC call and will be used by
`subscribechannels` as well. Its purpose is to mitigate code duplication
between the two RPC calls.
2019-02-05 18:17:54 -08:00
5181f100ed subscribe: add new subscribe package
This commit creates a new package 'subscribe', that exposes a common
Client-Server subscription system, that can be shared among packages.
2019-02-05 18:17:54 -08:00
8ac5f2bb17 Merge pull request #2586 from halseth/neutrinonotify-return-on-rescan-error
chainnrnfs/neutrino: return on historicalConf error
2019-02-05 18:09:02 -08:00
e5d660daf9 Merge pull request #2521 from joostjager/sendtosingleroute
lnrpc: deprecate SendToRoute with more than one route
2019-02-05 18:06:01 -08:00
6c78fc5740 Merge pull request #2550 from halseth/autpilot-agent-quit-pending-conn
autopilot: don't block Stop on pending connection
2019-02-05 16:39:31 -08:00
49a85b2eb3 autopilot/agent_test: add TestAgentQuitWhenPendingConns
TestAgentQuitWhenPendingConns tests that we are able to stop the autopilot
agent even though there are pending connections to nodes.
2019-02-05 10:45:53 +01:00
c19763c03f autopilot/agent: don't block Stop on pending connetion
To ensure a call to ConnectToPeer doesn't block the agent from
shutting down, we'll launch it in a non-waitgrouped goroutine, that
will signal when a result is returned.
2019-02-05 10:45:53 +01:00
077e1887fa Merge pull request #2564 from joostjager/move-paymentsession
routing: move payment session to separate file
2019-02-05 08:44:56 +01:00
27c7ce91f4 Merge pull request #2584 from halseth/utxonursery-baby-expiry-heighthint
utxonursery: use baby expiry as height hint
2019-02-04 17:21:28 -08:00
390018eae2 build+test+make: modify travis make directive to also compile sub-servers
In this commit, we modify the travis make directive to also compile all
the sub-severs using build flags. We do this as otherwise, we can only
detect mistakes in the build process of a sub-server via a manual
process. In this commit, we adapt travis to also cover this case.
2019-02-04 17:15:13 -08:00
a98d5deeb8 Merge pull request #2580 from halseth/autopilotrpc-imports-cleanup
[trivial] cleanup subserver imports
2019-02-04 12:46:53 -08:00
19ecc19d55 chainnrnfs/neutrino: return on historicalConf error
Would otherwise update height hint cache even on error during rescan.
2019-02-04 21:31:24 +01:00
e119b909e3 Merge pull request #2583 from Roasbeef/peer-info-conn-est
server: use chanInfo instead of chanPolicy to establish channel peer …
2019-02-04 12:16:44 -08:00
17645fefdf lnrpc: deprecate multiple routes sendtoroute 2019-02-04 13:07:30 +01:00
5a4951affd lnrpc: extract sendtoroute unmarshall to method 2019-02-04 13:06:58 +01:00
5d33d7226c Merge pull request #2477 from cfromknecht/utxo-lnrpc
lnrpc: replace ChanPoint w/ OutPoint in ListUnspent resp
2019-02-04 12:50:57 +01:00
9d9d148262 utxonursery: use baby expiry as height hint
Previously we would use the best known height as height hint, which
could lead to using a height hint above the actual block it confirms,
hence losing track of the confirmation.
2019-02-04 12:30:05 +01:00
5d7bb7406f Merge pull request #2568 from cfromknecht/lint-all-travis-builds
Makefile: lint all travis builds
2019-02-04 10:30:07 +01:00
1189f0ea6c server: use chanInfo instead of chanPolicy to establish channel peer conns
In this commit, we modify the way we attempt to locate the our channel
peer to establish a persistent connection on start up. Before this
commit, we would use the channel policy pointing to the peer to locate
the node as it's embedded in the struct. However, at times it's
currently possible for the channel policy to not be found in the
database if the remote nodes announces before we finalize the process on
our end. This can at times lead to a panic as the pointer isn't checked
before attempting to access it.

To remedy this, we now instead use the channel info which will _always_
be there if the channel is known.
2019-02-03 15:01:37 -08:00
16cceb8932 Add a links to KDF and BIP39
Just text changes
2019-02-02 17:45:13 +01:00
3daaa8cf74 lndrpc/invoicesrpc+walletrpc: clean up imports 2019-02-02 15:48:22 +01:00
7dab8b8f2d lnrpc/autopilotrpc: remove unused "os" import
This would cause the build to fail since the import is not used. It was
not detected since the file is under a build flag.
2019-02-02 15:48:15 +01:00
bcc9e30396 Merge pull request #2515 from cfromknecht/altruist-output-calc
watchtower/wtpolicy: altruist output calculation
2019-02-01 19:58:06 -08:00