Commit Graph

6336 Commits

Author SHA1 Message Date
Conner Fromknecht
34e36e9daa
lnrpc+rpcserver: rename ScriptPubkey to PkScript on Utxo msg 2019-02-11 13:02:25 -08:00
Conner Fromknecht
3fa9d81a41
lntest/harness: assert unconfirmed utxos in ListUnspent during sendCoins 2019-02-11 13:02:11 -08:00
Olaoluwa Osuntokun
932fafd7cd
lnd_test: extend on chain recovery test to assert utxos 2019-02-11 13:02:00 -08:00
Conner Fromknecht
cb2723236f
lnrpc: correct tab indentation to 4 space 2019-02-11 13:01:49 -08:00
Conner Fromknecht
287c4d0658
Merge pull request #2630 from alexbosworth/patch-10
trivial: typo fix
2019-02-11 12:49:56 -08:00
Alex Bosworth
b3ae5bc16e
trivial: typo fix 2019-02-10 21:18:34 -08:00
Joost Jager
c44d4046c1
Merge pull request #2572 from joostjager/outgoing-chan-selection
routing: add outgoing channel restriction
2019-02-09 11:33:43 +01:00
Olaoluwa Osuntokun
f4dfcc35aa
Merge pull request #2606 from cfromknecht/wtwire-init-connection-features
watchtower/multi: send connection features + chain hash in Init
2019-02-08 18:48:54 -08:00
Olaoluwa Osuntokun
16d69e8551
Merge pull request #2605 from cfromknecht/wtwire-uniform-feature-names
watchtower/wtwire/features: make wtwire features uniform
2019-02-08 18:39:37 -08:00
Olaoluwa Osuntokun
f184188d18
Merge pull request #2604 from cfromknecht/wtclient-weight-pkscript-fixups
watchtower/wtclient: weight + sweep pkscript fixups
2019-02-08 18:35:44 -08:00
Olaoluwa Osuntokun
696e433d88
Merge pull request #2587 from Roasbeef/sub-server-travis
build+test+make: modify travis make directive to also compile sub-ser…
2019-02-08 15:11:25 -08:00
Joost Jager
7c30a8c493
routing: add outgoing channel restriction 2019-02-08 23:05:56 +01:00
Conner Fromknecht
0045ad567d
watchtower/wtwire/features: make wtwire feature uniform 2019-02-07 16:13:42 -08:00
Johan T. Halseth
c1ab49909f
Merge pull request #2517 from roeierez/chain_control_cleanup
Proper cleanup neutrino database in case of error
2019-02-07 17:26:44 +01:00
Johan T. Halseth
351865ac67
Merge pull request #2591 from halseth/fndg-dont-spew-shortchanid
[trivial] fundingmanager: don't spew log shortChanID
2019-02-07 11:36:12 +01:00
Joost Jager
e26dc6ac57
Merge pull request #2601 from Roasbeef/send-to-route-rest-fix
rpc: fix regression in SendToRouteSync payment hash parsing
2019-02-07 10:31:47 +01:00
Conner Fromknecht
4dbade64dd
watchtower/multi: send connection features + chain hash in Init 2019-02-06 20:09:19 -08:00
Conner Fromknecht
a00fc148c8
watchtower/wtclient/backup_task: make sweep pkscript independent of session
This commit changes when the sweep pkscript
is assigned in the construction of the justice
transaction. Currently, the sweep pkscript is
assigned when the task is bound to a session.
However, we will moving to an assignment where
a unique sweep pkscript is used per channel to
prevent address inflation. Hence, this commit
makes the sweep pkscript a state dependent
variable, since it can be known at the time the
channel id is assigned.
2019-02-06 18:24:30 -08:00
Conner Fromknecht
fe9f703b5b
watchtower/wtclient/backup_task: correct txweight + update test vectors 2019-02-06 18:24:30 -08:00
Olaoluwa Osuntokun
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
Olaoluwa Osuntokun
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
Olaoluwa Osuntokun
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
Olaoluwa Osuntokun
27cfdf944e
Merge pull request #2457 from joostjager/cancelinvoice
invoices: CancelInvoice
2019-02-06 14:45:16 -08:00
Johan T. Halseth
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
Joost Jager
a8baa23c2e
lncli: add cancel invoice command 2019-02-06 07:29:38 +01:00
Joost Jager
077852cd4e
htlcswitch/test: test canceled invoice 2019-02-06 07:29:35 +01:00
Joost Jager
f80fb286d8
htlcswitch/test: add two hop network 2019-02-06 07:29:32 +01:00
Joost Jager
524d2465e0
htlcswitch/test: extract generic hop network 2019-02-06 07:29:29 +01:00
Joost Jager
9cac0efab7
htlcswitch/test: create preparePayment function 2019-02-06 07:29:26 +01:00
Joost Jager
e7907e0e7c
htlcswitch/test: add waitForPaymentResult helper function 2019-02-06 07:29:24 +01:00
Joost Jager
afd2d69906
htlcswitch/test: convert makePayment into function 2019-02-06 07:29:21 +01:00
Joost Jager
1b87fbfab2
invoices+htlcswitch+lnrpc: cancel invoice 2019-02-06 07:29:18 +01:00
Olaoluwa Osuntokun
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
Olaoluwa Osuntokun
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
Olaoluwa Osuntokun
c05a7c5c44
Merge pull request #1988 from valentinewallace/subscribe-chans-rpc
rpc: Add SubscribeChannels RPC.
2019-02-05 19:18:52 -08:00
Conner Fromknecht
e13d88f3f3
watchtower/wtclient/backup_task_internal_test: adds backupTask utests 2019-02-05 18:27:19 -08:00
Conner Fromknecht
8f98522f13
watchtower/wtclient/backup_task: adds backupTask 2019-02-05 18:27:13 -08:00
Conner Fromknecht
f1f52410ab
sweep/input: adds NewBaseInput to return reference 2019-02-05 18:27:07 -08:00
Valentine Wallace
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
Valentine Wallace
ff0339a186 rpcserver: implement SubscribeChannels RPC call. 2019-02-05 18:18:06 -08:00
Valentine Wallace
8b388b1301 lnrpc: add SubscribeChannels RPC & relevant messages to RPC protos. 2019-02-05 18:18:06 -08:00
Valentine Wallace
10090a978d contractcourt/chain_arbitrator: notify the ChannelNotifier on newly closed channels. 2019-02-05 18:17:54 -08:00
Valentine Wallace
bdd8ce14c9 switch: notify the ChannelNotifier on newly active/inactive channels. 2019-02-05 18:17:54 -08:00
Valentine Wallace
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
Valentine Wallace
5405028948 fundingmanager: inform ChannelNotifier about newly open channels. 2019-02-05 18:17:54 -08:00
Valentine Wallace
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
Valentine Wallace
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
Johan T. Halseth
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
Conner Fromknecht
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
Olaoluwa Osuntokun
e5d660daf9
Merge pull request #2521 from joostjager/sendtosingleroute
lnrpc: deprecate SendToRoute with more than one route
2019-02-05 18:06:01 -08:00