Commit Graph

8171 Commits

Author SHA1 Message Date
Joost Jager
2e920de292
routing+lnrpc: move default payment timeout out of router
This commit moves the default timeout out of router and thereby fixes a
bug that caused SendToRoute to not return the actual error, but a
timeout result instead. SendToRoute only tries a single route, so a
timeout should never happen.
2019-06-11 08:36:17 +02:00
Joost Jager
9e26e4e8da
invoices: check invoice amount even when already accepted or settled 2019-06-10 16:12:10 +02:00
Joost Jager
18c025151a
invoices+channeldb: move invoice state check to invoiceregistry 2019-06-10 16:12:08 +02:00
Yaacov Akiba Slama
bbaf37b7d2 Initialize addressType to UnknownAddressType 2019-06-10 15:22:17 +03:00
Johan T. Halseth
e45d4d703a
Merge pull request #2762 from halseth/reliable-payments-lookup-circuitmap
[reliable payments] persist htlcswitch pending payments
2019-06-08 18:05:30 +02:00
Johan T. Halseth
187c8bc0b5
config+autopilot: make conftarget configurable 2019-06-08 17:29:33 +02:00
Johan T. Halseth
9a7f24d2d3
autopilot: extract default fee estimate target conf into constant 2019-06-08 17:22:34 +02:00
Johan T. Halseth
dd88015985
htlcswitch/switch test: add TestSwitchGetPaymentResult
TestSwitchGetPaymentResult tests that the switch interacts as expected
with the circuit map and network result store when looking up the result
of a payment ID. This is important for not to lose results under
concurrent lookup and receiving results.
2019-06-07 16:53:33 +02:00
Johan T. Halseth
dd3abbc4ef
htlcswitch/payment_result_test: add TestNetworkResultStore
TestNetworkResultStore tests that the networkResult store behaves as
expected, and that we can store, get and subscribe to results.
2019-06-07 16:53:33 +02:00
Johan T. Halseth
f556b375ff
lnd_test: add testHoldInvoicePersistence
testHoldInvoicePersistence tests that a sender to a hold-invoice, can be
restarted before the payment gets settled, and still be able to receive
the preimage.
2019-06-07 16:53:32 +02:00
Johan T. Halseth
2cc778d309
htlcswitch/switch: use paymentResultStore to keep track of results 2019-06-07 16:53:32 +02:00
Johan T. Halseth
2dea790b55
multi: make GetPaymentResult take payment hash
Used for logging in the switch, and when we remove the pending payments,
only the router will have the hash stored across restarts.
2019-06-07 16:53:32 +02:00
Johan T. Halseth
1febe1a6d5
htlcswitch/payment_result: add paymentResultStore
paymentResultStore is a persistent store where we keep track of all
received payment results. This is used to ensure we don't lose results
from payment attempts on restarts.
2019-06-07 16:53:32 +02:00
Johan T. Halseth
df3f5d02ad
htlcswitch/payment_result: add (de)serialization of networkResult + test 2019-06-07 16:53:32 +02:00
Johan T. Halseth
f5dee02ff4
htlcswitch/mock: set SelfKey and mock ErrorSource 2019-06-07 16:42:25 +02:00
Olaoluwa Osuntokun
414f501e2b
rpc: set new RawTxHex field in GetTransactions response 2019-06-07 07:38:02 -07:00
Olaoluwa Osuntokun
0db0c5be93
lnrpc: add RawTxHex field to Transaction message 2019-06-07 07:37:35 -07:00
Olaoluwa Osuntokun
eaf86cc4f9
lnwallet: add raw tx hex attribute to ListTransactionDetails 2019-06-07 07:36:32 -07:00
Olaoluwa Osuntokun
52b7603d25
Merge pull request #3118 from valentinewallace/neutrino-assert-filter-header
neutrino: enable user to assert filter header chain.
2019-06-07 14:12:27 +02:00
Valentine Wallace
25b540fec4 chainregistry+config: add neutrino flag to assert filter header chain 2019-06-06 16:05:12 -07:00
Valentine Wallace
818dbb9e9b go.mod: update to latest neutrino to enable asserting filter hash. 2019-06-06 16:05:09 -07:00
Wilmer Paulino
2ccd93a2d0
Merge pull request #3031 from neevai/patch-1
Added NETWORK env var to btcd service
2019-06-06 13:12:27 -07:00
Olaoluwa Osuntokun
aa5156a1a9
Merge pull request #3089 from wpaulino/pendingsweeps-rpc
sweep+rpc+cmd/lncli: expose pending input sweeps over RPC + CLI
2019-06-06 13:15:48 +02:00
Conner Fromknecht
f8db49e7e4
routing/router: remove router-level reject cache
This is now redundant since we have one at the db-level
2019-06-06 13:02:16 +02:00
Conner Fromknecht
c338fdc2f2
Merge pull request #2535 from federicobond/once-refactor
multi: replace manual CAS with sync.Once in component start/stop
2019-06-06 12:51:51 +02:00
Wilmer Paulino
1d8b70eaa6
cmd/lncli: expose pending input sweeps within UtxoSweeper over lncli 2019-06-06 03:23:19 -07:00
Johan T. Halseth
473afbcac5
Merge pull request #3163 from Roasbeef/spend-ntfn-fix
build: update to latest btcd version
2019-06-06 11:30:55 +02:00
Wilmer Paulino
d01f88ecdc
lnrpc/walletrpc: expose pending input sweeps within UtxoSweeper over RPC 2019-06-05 12:10:33 -07:00
Wilmer Paulino
d75fac26bc
sweep: expose pending input sweeps within the UtxoSweeper 2019-06-05 12:10:32 -07:00
Wilmer Paulino
50a8f188a3
sweep: add lastFeeRate field to PendingInput
This will serve useful when exposing the pending inputs over RPC, since
we currently don't keep track of the last fee rate used for an input.
2019-06-05 12:10:31 -07:00
Olaoluwa Osuntokun
880279b266
Merge pull request #2973 from joostjager/newer-payment-rpc
routerrpc: async payment rpc
2019-06-05 15:03:38 +02:00
Joost Jager
220c2becb1
lncli: unify payinvoice and sendpayment code
This commit prepares lncli for moving over to routerrpc payment calls.
2019-06-05 12:41:57 +02:00
Joost Jager
2644759924
channeldb: add todo for more detailed failure reasons 2019-06-05 12:41:55 +02:00
Joost Jager
f03533c67a
routerrpc: convert sendpayment to async
Modify the routerrpc SendPayment api to asynchronous. This allows
callers to pick up a payment after the rpc connection was lost or lnd
was restarted.
2019-06-05 12:41:53 +02:00
Joost Jager
07d289c14e
routing: add SendPaymentAsync to router 2019-06-05 12:41:51 +02:00
Joost Jager
eb2647e8fc
channeldb: add subscription to control tower
Allows other sub-systems to subscribe to payment success and fail
events.
2019-06-05 12:41:49 +02:00
Joost Jager
87d3207baf
channeldb+routing: move control tower interface to routing
This commit creates an empty shall for control tower in the routing
package. It is a preparation for adding event notification.
2019-06-05 12:41:47 +02:00
Joost Jager
eb700d35e1
routerrpc: extend payment request parameters
Add missing parameters to routerrpc version of SendPayment.
2019-06-05 12:41:45 +02:00
Joost Jager
19d5f8f82c
routing: move default cltv assignment out of router
This commit lifts default setting up to the rpc server level, in line
with other payment defaults.
2019-06-05 12:41:43 +02:00
Joost Jager
afd86763ac
lntypes: add ZeroHash 2019-06-05 12:41:41 +02:00
Olaoluwa Osuntokun
970d760407
Merge pull request #3142 from cfromknecht/htlc-tie-breaker
lnwallet: add commitment transaction sorting with CLTV tie breaker
2019-06-05 12:05:04 +02:00
Olaoluwa Osuntokun
5fd2fe9ffa
build: update to latest btcd version
In this commit, we update to the latest version of btcd which includes a
fix for notifying based on pkScripts for spends/confirmations within the
ChainNotifier.
2019-06-05 02:50:05 -07:00
Olaoluwa Osuntokun
7453dbeacc
Merge pull request #2802 from joostjager/probability
routing: probability based path finding
2019-06-05 11:30:55 +02:00
Olaoluwa Osuntokun
1077e74667
Merge pull request #3161 from wpaulino/travis-logs-regression
travis: fix log upload regression after itest move
2019-06-05 08:48:08 +02:00
Conner Fromknecht
b26b88a1e2
lnwallet/channel: use proper commitment output sorting 2019-06-05 08:35:06 +02:00
Conner Fromknecht
a627c65d65
lnwallet/commit_sort: add commit sorting with htlc tie breaker 2019-06-05 08:34:45 +02:00
Wilmer Paulino
18342410f0
travis: fix log upload regression after itest move 2019-06-04 15:03:54 -07:00
Wilmer Paulino
e6c0ddc825
Merge pull request #3155 from halseth/sendtoroute-zero-value
routing/router: correct SendToRoute's amount record in DB
2019-06-04 14:57:41 -07:00
Olaoluwa Osuntokun
0139300a00
Merge pull request #3154 from halseth/chainntfs-neutrino-async-getutxo
neutrinonotify: async call GetUtxo from RegisterSpendNtfn
2019-06-04 14:13:44 -07:00
Federico Bond
9bd3055fb8 discovery,fundingmanager: avoid serialization in NotifyWhenOnline 2019-06-04 16:36:21 -03:00