Commit Graph

9102 Commits

Author SHA1 Message Date
Joost Jager
907f0f1948
Merge pull request #3820 from joostjager/fix-logger
build: prevent loggers from overwriting each other.
2019-12-11 17:33:42 +01:00
Joost Jager
b2f43858c3
invoices: accept mpp payments 2019-12-11 16:14:49 +01:00
Joost Jager
56958493fe
invoices/test: add test clock 2019-12-11 16:08:09 +01:00
Joost Jager
499f2b16cf
invoices: add RegistryConfig struct 2019-12-11 16:08:07 +01:00
Andras Banki-Horvath
56282db30a
queue: Introducing a general purpose priority queue.
This commit introduces PriorityQueue, which is a general, heap
based priority queue, and PriorityQueueItem which is an interface
that concrete priority queue items must implement.
This implementation is encapsulated, users do not need to use any
other package for full functionality.
PriorityQueue exports the usual public methids: Push, Pop, Top,
Empty and Len. For full documentaton consult the priority_queue.go,
for usage: priority_queue_test.go
2019-12-11 16:08:05 +01:00
Joost Jager
9f1720dea8
build: prevent loggers from overwriting each other.
Previously only the last registered logger would receive debug level
changes.
2019-12-11 15:22:00 +01:00
Olaoluwa Osuntokun
70c5fe3d00
Merge pull request #3697 from joostjager/lower-min-htlc
config: improve management of htlc amount lower limit
2019-12-10 18:05:49 -08:00
Olaoluwa Osuntokun
a7c2b12f5c
Merge pull request #3785 from Roasbeef/gossip-queries-fix
discovery: properly set FirstBlockHeight and NumBlocks in responses
2019-12-10 18:03:50 -08:00
Olaoluwa Osuntokun
6a9b96122d
discovery: properly set FirstBlockHeight and NumBlocks in responses
In this commit we fix in a bug in `lnd` that could cause other
implementations which implement a strict version of the spec to
disconnect when trying to sync their channel graph using the gossip
query feature. Before this commit, we would embed the request to a
`QueryChannelRange` in the response, causing some clients to reject the
response as the `FirstBlockHeight` and `NumBlocks` field would be
identical for each chunk of the response.

In order to remedy this, we now properly set these two fields with each
returned chunk. Note that even after this commit, we keep our existing
behavior surrounding the `Complete` field as is. Otherwise, current
`lnd` clients which rely on this field (rather than the two
aforementioned fields) wouldn't be able to properly detect when a set of
responses to their query was "complete".

Partially fixes #3728.
2019-12-10 17:05:58 -08:00
Joost Jager
61e114f201
autopilot: take channel min htlc from config 2019-12-11 00:17:10 +01:00
Joost Jager
b6eb3a69ba
routing+lnrpc+lncli: allow setting min htlc policy 2019-12-11 00:17:08 +01:00
Joost Jager
74c2df658e
localchans: log policy update error 2019-12-11 00:17:06 +01:00
Joost Jager
f289dbd826
routing: define subsystem constant 2019-12-11 00:17:04 +01:00
Joost Jager
16ca36985e
chainregistry: lower incoming htlc amount default 2019-12-11 00:17:02 +01:00
Joost Jager
b826858a50
config: expose minhtlcout as a config parameter 2019-12-11 00:17:01 +01:00
Joost Jager
55ff1131de
fundingmanager: check remote min htlc against our defaults 2019-12-11 00:16:59 +01:00
Joost Jager
ddb98fcc41
multi: distinguish between htlc in and out constraints 2019-12-11 00:16:57 +01:00
Joost Jager
d8fd6fae23
config+channeldb: describe min_htlc fields more accurately 2019-12-11 00:16:55 +01:00
Joost Jager
dbce59d4e1
fundingmanager: do not calculate unused policy values 2019-12-11 00:16:53 +01:00
Olaoluwa Osuntokun
a68144b709
Merge pull request #3802 from cfromknecht/rpc-invoice-features
rpc: expose invoice features in decodepayreq
2019-12-10 15:12:19 -08:00
Conner Fromknecht
1367187454
multi: set invoice feature bits using feature manager 2019-12-10 13:09:52 -08:00
Conner Fromknecht
a168f37b9c
lnwire+rpcserver: populate feature bits on decodepayreq 2019-12-10 13:09:36 -08:00
Conner Fromknecht
5defa425e1
lnrpc: add feature bits to PayReq 2019-12-10 13:09:17 -08:00
Conner Fromknecht
f34239889b
lnwire/feature: remove feature bit number from name
The number and the name will be separate on the rpc level, so we remove
the feature bit from the string. Currently this method is unused apart
from maybe in some rare logging instances.
2019-12-10 13:08:59 -08:00
Conner Fromknecht
a77e111c52
zpay32: remove unused InvoiceFeatures
Originally the feature namespaces were destined to be split, but this
has changed with the introduction of flat features.
2019-12-10 13:08:40 -08:00
Wilmer Paulino
3c6be62b18
Merge pull request #3702 from carlaKC/lnrpc-addcloseaddress
Add optional close address
2019-12-10 13:01:45 -08:00
Wilmer Paulino
d01feb516f
Merge pull request #3813 from ellemouton/add-space-in-log-message
bitcoindnotify: add missing space in log message in bitcoind.go
2019-12-10 12:29:05 -08:00
Wilmer Paulino
9484287f1f
Merge pull request #3815 from alexbosworth/patch-13
trivial: typo fix
2019-12-10 11:14:29 -08:00
Alex Bosworth
3b161289ae
trivial: typo fix
Correct `diconnecting` to `disconnecting`
2019-12-10 10:13:55 -08:00
Elle Mouton
3aa8972cc7 bitcoindnotify: add missing space in log message in bitcoind.go 2019-12-10 14:54:27 +02:00
Oliver Gugger
d47f67d260
signrpc+subserver: add key chain to signer 2019-12-10 09:48:13 +01:00
carla
94d3eb60a4
multi: Use user provided close address for cooperative closes
This commit is adapted from @Bluetegu's original
pull request #1462.

This commit reads an optional address to pay funds out to
from a user iniitiated close channel address. If the channel
already has a shutdown script set, the request will fail if
an address is provided. Otherwise, the cooperative close will
pay out to the address provided.
2019-12-10 09:13:01 +02:00
carla
ef4d9334b7
lncli: Add optional delivery address to close channel
This commit is adapted from @Bluetegu's original
pull request #1462.
2019-12-10 09:13:00 +02:00
bluetegu
25caece160
lnrpc: Add optional delivery addresss to close channel
This commit is adapted from @Bluetegu's original
pull request #1462.
2019-12-10 09:12:54 +02:00
Joost Jager
699bb193e4
Merge pull request #3742 from joostjager/expose-custom-tlv
invoices: expose custom tlv records from the payload
2019-12-10 07:53:59 +01:00
Joost Jager
5f4bd136cd
invoices: store custom records in invoice database 2019-12-10 06:54:24 +01:00
Joost Jager
37258c414c
hop: store custom records from payload 2019-12-10 06:54:22 +01:00
Joost Jager
cbe213fd0c
tlv: expose unknown values 2019-12-10 06:54:20 +01:00
Olaoluwa Osuntokun
1ab3107df4
Merge pull request #3806 from Roasbeef/payreq-msat
lnrpc: add msats to return value of DecodePayReq
2019-12-09 16:37:18 -08:00
Anton Kovalenko
298f35cdfb lncli addholdinvoice: allow specifying msat with --amt_msat
* pass amt and amt_msat to rpc, letting server give an error if both
are present
* take amt from an extra argument if neither amt nor amt_ms are present
2019-12-09 18:45:27 +03:00
Olaoluwa Osuntokun
843b974d66
Merge pull request #3804 from Roasbeef/revert-strict-payment
peer+funding: revert link level payment clamps
2019-12-06 16:03:09 -08:00
Olaoluwa Osuntokun
47235e2f98
lnrpc: add msats to return value of DecodePayReq
In this commit, we add `msats` to the return value of `DecodePayReq` to
ensure we always show full value information as we're moving to do
generally for all RPC calls that deal with off-chain amounts.
2019-12-06 15:48:30 -08:00
Olaoluwa Osuntokun
abb44e18e2
Revert "funding: ensure the chan policy max htlc size is below max pay size"
This reverts commit 9b3385e87de8b2da51a9c979cd4e8ef770078ae2.
2019-12-06 15:12:17 -08:00
Olaoluwa Osuntokun
b3b34d9de2
Revert "peer: clamp a link's max HTLC forwarding policy to current max HTLC pay size"
This reverts commit c943d850193a476be1bc37ed922d1954cf040948.
2019-12-06 15:11:56 -08:00
Conner Fromknecht
d230cf89b9
Merge pull request #3774 from bhandras/hotfix
lnwire: fixing buffer size and cleaning up uint16/32 conversion
2019-12-05 17:03:16 -08:00
Conner Fromknecht
8b3ee62366
Merge pull request #3794 from cfromknecht/stage-travis
travis: staged builds
2019-12-05 15:34:01 -08:00
Conner Fromknecht
d7af7934b8
travis: staged travis builds
This PR introduces staging to our travis pipeline. Currently all
instances perform:

 - compilation of lnd
 - linting
 - compilation and installation of btcd binaries
 - installation of bitcoind binaries

In total this adds about 3 minutes to each of our 5 instances, resulting in
roughly 12 minutes of redundant execution time. Additionally, if if a build
fails to compile or lint we detect this 5 separate times, consuming precious
instances from other builds.

We alleviate this by adding an initial Build phase, which runs a single
instance performing the actions above. This has the benefit of quickly sanity
checking the pr before moving on to the more expensive unit or integration test
suites, and failing faster for common mistakes. It also warms up the build
caches for the Test stage in one fell swoop.

For instance, if 5 people push changes at the same time, they can all get
immediate feedback regarding compilation or linting issues, and potentially
save hours waiting for other people's test to finish or fail before finding out
they had a spelling error. This doesn't alleviate all possible issues, e.g. the
5 instances may already be consumed by test suites, but it does make a sizable
step towards minimizing time-to-failure in common scenarios.
2019-12-05 14:36:01 -08:00
Conner Fromknecht
f3398c0c0e
Merge pull request #3789 from cfromknecht/coop-close-rpc-status
republish force and coop closes on startup
2019-12-05 10:35:53 -08:00
Conner Fromknecht
969fe440b7
Merge pull request #3788 from cfromknecht/payment-addr
parse and generate bolt 11 invoices w/ payment addrs
2019-12-05 10:29:35 -08:00
Conner Fromknecht
abb7f4fa9e
lnrpc+rpcserver: add payment_addr field to PayReq 2019-12-05 07:59:47 -08:00