Commit Graph

9277 Commits

Author SHA1 Message Date
Joost Jager
7e4f9dd70a
routing/test: simplify context instantiation 2019-11-26 21:40:30 +01:00
Joost Jager
949a5c5a04
Merge pull request #3736 from joostjager/route-to-self
routing: allow route to self
2019-11-26 21:37:31 +01:00
Matheus Degiovani
cf6ae06b30 zpay32: Add tests of checksum malleability
This adds tests for checksum malleability issue of bech32 strings as
used by LN invoices.
2019-11-26 17:09:35 -03:00
Matheus Degiovani
409cf55655 zpay32: Fix broken last tagged field
This fixes an issue where the last tagged field of an invoice could get
broken due to the malleability of bech32 checksums.

The addition of a specific character in the second to last position of
the checksum could cause the previous signature field to mutate and thus
point to a different public node.
2019-11-26 14:26:03 -03:00
Matheus Degiovani
85f9c03797 zpay32: Switch to ErrInvalidFieldLength sentinel
This switches the applicable error to use an exported sentinel error so
that it is more testable.
2019-11-26 14:26:03 -03:00
Johan T. Halseth
e8e5fd7abc
mobile: run goimports on generated files
Subservers might depend on each other (notably walletrpc depends on
signrpc) so running goimports ensures they properly import each other.
2019-11-26 14:57:17 +01:00
Oliver Gugger
fb683f74a4
chanbackup: set funding broadcast height on restore 2019-11-26 14:45:22 +01:00
Oliver Gugger
d4f836ecb3
chanbackup: encode broadcast height in chan ID for unconfirmed channels 2019-11-26 14:45:21 +01:00
Joost Jager
2d19201ede
lnrpc+routerrpc+lncli: add allow_self_payments safety flag 2019-11-26 10:15:46 +01:00
Joost Jager
f8e9efbf99
routing: allow route to self 2019-11-26 10:15:44 +01:00
Joost Jager
81b7798c03
routing: pop heap at the end of the loop
This prepares for routing to self.
2019-11-26 10:15:42 +01:00
Joost Jager
683282fa24
routing: check loop conditions at end
This prepares for routing to self. When checking the condition at the
start, the loop would terminate immediately because the source is equal
to the target.
2019-11-26 10:15:40 +01:00
Joost Jager
2b332893b7
routing/test: add test focusing on not having a cycle 2019-11-26 10:15:38 +01:00
Olaoluwa Osuntokun
cb2b8b4513
Merge pull request #3693 from cfromknecht/tlv-invoice
migrate to tlv for invoice body
2019-11-25 18:00:52 -06:00
Olaoluwa Osuntokun
ff268ac39d
Merge pull request #3748 from halseth/falafel-updates
[mobile] Update readme and comments
2019-11-25 17:27:00 -06:00
Olaoluwa Osuntokun
be4a1a2704
Merge pull request #3759 from wpaulino/travis-bitcoind-0.19.1
build: bump travis bitcoind version to 0.19.0.1
2019-11-25 17:25:18 -06:00
Wilmer Paulino
75dbfba4ec
lntest: lower cpfp fee due to new bitcoind max fee restriction 2019-11-25 12:40:01 -08:00
Wilmer Paulino
44fa28b27b
build: bump travis bitcoind version to 0.19.0.1 2019-11-25 10:59:00 -08:00
Conner Fromknecht
59c4db7f33
Merge pull request #3756 from cfromknecht/non-verbose-unit-tests
Makefile: non-verbose unit tests
2019-11-24 06:39:31 -08:00
Conner Fromknecht
a83958408d
Merge pull request #3648 from cfromknecht/safe-disconnect
config+itest: allow unsafe disconnect by default
2019-11-22 21:07:17 -08:00
Olaoluwa Osuntokun
74849e7325
Merge pull request #3737 from guggero/resume-scb
chanbackup: continue recovery if channel already exists
2019-11-22 19:40:47 -08:00
Olaoluwa Osuntokun
6356316a4c
Merge pull request #3757 from cfromknecht/fix-nanonsecond-typo
lnrpc: fix nanonsecond typo
2019-11-22 16:24:41 -08:00
Conner Fromknecht
4c5b251748
Merge pull request #3750 from halseth/itest-flake-replacement-forceclose
lnd_test: fix race condition on simultanous force closes
2019-11-22 13:59:31 -08:00
Conner Fromknecht
b07fb37c34
Merge pull request #3751 from halseth/itest-numactivenodes-mtx
lntest/node: add numActiveNodesMtx
2019-11-22 13:56:45 -08:00
Conner Fromknecht
dd13a3c0d8
Makefile: make unit tess non-verbose
Makes it easier to spot failures without scrolling through pages of
successful tests.
2019-11-22 12:29:02 -08:00
Conner Fromknecht
9287610b83
lnrpc: fix nanonsecond typo 2019-11-22 12:23:35 -08:00
Wilmer Paulino
0c83a066e9
Merge pull request #3754 from dennisreimann/patch-1
Document setting multiple tlsextra entries
2019-11-22 10:41:22 -08:00
Joost Jager
43d2e7528e
Merge pull request #3493 from joostjager/small-successes
routing: track amt ranges in mission control
2019-11-22 14:46:30 +01:00
Conner Fromknecht
3b253e05f6
multi: restructure invoice Terms field
This commit restructures an invoice's ContractTerms to better encompass
the restrictions placed on settling. For instance, the final ctlv delta
and invoice expiry are moved from the main invoice body (where
additional metadata is stored). Additionally, it moves the State field
outside of the terms since it is rather metadata about the invoice
instead of any terms offered to the sender in the payment request.
2019-11-22 02:25:02 -08:00
Conner Fromknecht
6cabea563e
channeldb/invoices: optimize deserializeHtlcs
Instead of allocating a byte slice to read in each htlc's raw TLV
stream, use a LimitReader to truncate the stream to the proper length.
2019-11-22 02:24:44 -08:00
Conner Fromknecht
4c872c438b
channeldb: complete migration 12 for TLV invoices 2019-11-22 02:24:28 -08:00
Conner Fromknecht
76682ad820
channeldb/migration12: add tlv invoice migration tests 2019-11-22 02:24:11 -08:00
Conner Fromknecht
4b358aa2ad
channeldb/migration12: write out invoices using TLV encoding 2019-11-22 02:23:59 -08:00
Conner Fromknecht
0f8048d336
channeldb/migration12: copy invoice deserialization 2019-11-22 02:23:47 -08:00
Conner Fromknecht
c6a01f02cd
lnwire/features: add Encode256 and Decode256
These will allow us to serialize invoice features bits without double
encoding the length.
2019-11-22 02:23:35 -08:00
Conner Fromknecht
76a2dfd8a6
lnrpc: remove receipt field from invoice 2019-11-22 02:23:24 -08:00
Joost Jager
cdf1aa5bc1
routing: track amt ranges in mc 2019-11-22 11:17:28 +01:00
Joost Jager
62f8cca75b
routing+routerrpc: also expose amt for success results in mc 2019-11-22 11:17:26 +01:00
Dennis Reimann
dcfeebaa1b
Document setting multiple tlsextra entries
Minor addition to #2704, because I was wondering how to set multiple tlsextra entries.
2019-11-22 10:22:28 +01:00
Olaoluwa Osuntokun
6f9fcfaccc
Merge pull request #3499 from cfromknecht/mpp-payments-rpc
channeldb+rpcserver: expose legacy payments as multi-path payments
2019-11-21 18:38:53 -08:00
Johan T. Halseth
ddeb9fbbbb
chainntnfs/txnotifier: promote historical spend log to info
And add some more details.
2019-11-21 15:18:27 +01:00
Johan T. Halseth
339543857a
chainntnfs/txnotifier: add more debug logs aroung spend dispatch
To track down missing spends.
2019-11-21 15:18:20 +01:00
Johan T. Halseth
1c832789d6
chainntnfs/bitcoind: log finished hitsorical spend dispatch 2019-11-21 15:18:15 +01:00
Johan T. Halseth
fa40fa6950
chainntnfs/interface: add String method for SpendDetaill 2019-11-21 15:18:10 +01:00
Johan T. Halseth
2e85647ec4
chainntnfs/txnotifier: include script in SpendRequest string representation 2019-11-21 15:18:01 +01:00
Andreas M. Antonopoulos
651ca47f37 Warn user before doing SCB restore
SCB restore closes all open channels. We need to warn users that this is what will happen if they try to do an SCB restore.
2019-11-21 08:38:28 -05:00
Johan T. Halseth
ddbd7a68ac
lntest/node: add numActiveNodesMtx
Fixes a slight race condition that could happen since Alice and Bob are
created in different goroutines, leading to using the same listening
ports.
2019-11-21 13:57:30 +01:00
Johan T. Halseth
08803e2e41
lnd_test: fix race condition on simultanous force closes
This fixes an issue that would lead to a flake during intergration
tests. Carol would start up with a outdated state and attempt to force
close the channel. At the same time she would connect to Dave,
triggering the dataloss protection. Dave would respond by force closing
the channel, and Dave transaction would in some cases have a higher fee,
resulting Carol's tx being replaced.

We fix this by suspending Dave until Carol's close tx is mined.
2019-11-21 13:43:29 +01:00
Johan T. Halseth
2754f5dea0
mobile: 80 char limit readme 2019-11-21 12:35:52 +01:00
Johan T. Halseth
27abe4a301
mobile: halseth/falafel -> lightninglabs/falafel 2019-11-21 12:34:38 +01:00