Commit Graph

10937 Commits

Author SHA1 Message Date
nsa
0dda9e06ce multi: exporting PendingUpdate, ChannelCloseUpdate, ErrorBufferSize 2020-07-06 19:16:06 -04:00
nsa
ac3d416b04 peer_test.go: fixes to coop close tests, modifying variable names
to either be alice or bob-prefixed. This helps an observer understand
what the test is actually doing.
2020-07-06 19:16:06 -04:00
nsa
ac72479b10 server.go: log DisconnectPeer errors, use public functions to access
peer internals.
2020-07-06 19:16:06 -04:00
nsa
bfaef46579 peer_test.go: comment clarifications 2020-07-06 19:16:06 -04:00
nsa
d23b30d889 peer.go: comment clarifications, improved formatting 2020-07-06 19:16:06 -04:00
nsa
01415f4a5f peer: define Config and LinkUpdater interface
This commit defines a Config for initializing a peer and the
LinkUpdater interface.
2020-07-06 19:16:06 -04:00
nsa
50186ba834 lnpeer/peer.go: modifying interface comment 2020-07-06 19:16:06 -04:00
Joost Jager
f9c6a1b73f
Merge pull request #4418 from joostjager/anchor-vectors
lnwallet/test: anchor vectors
2020-07-06 13:38:28 +02:00
Joost Jager
16577d7d0e
lnwallet/test: anchor test vectors 2020-07-06 12:45:17 +02:00
Joost Jager
1c775d131b
lnwallet/test: close database after test 2020-07-06 12:45:15 +02:00
Joost Jager
c65f60b101
lnwallet/test: convert test vectors to json 2020-07-06 12:45:13 +02:00
vctt94
2f6a8b13ae fundingmanager: Add max value to fundingmanager and fundingmanager_test 2020-07-03 11:09:40 -03:00
vctt94
6845763aa5 lncli: Add max_value_in_flight flag to openchannel 2020-07-03 11:09:34 -03:00
Olaoluwa Osuntokun
2d4facf940
Merge pull request #4428 from wpaulino/relative-thaw-height
multi: add relative thaw height interpretation
2020-07-02 15:37:23 -07:00
Wilmer Paulino
6075997ebc
multi: add relative thaw height interpretation
This is useful when we wish to have a channel frozen for a specific
amount of blocks after its confirmation. This could also be done with an
absolute thaw height, but it does not suit cases where a strict block
delta needs to be enforced, as it's not possible to know for certain
when a channel will be included in the chain. To work around this, we
add a relative interpretation of the field, where if its value is below
500,000, then it's interpreted as a relative height. This approach
allows us to prevent further database modifications to account for a
relative thaw height.
2020-07-02 12:05:49 -07:00
vctt94
8ebdfe3128 lnrpc: Add MaxValueInFlight flag 2020-07-02 15:50:26 -03:00
vctt94
474ce4ae25 server: Add max value in flight to server 2020-07-02 15:49:19 -03:00
Conner Fromknecht
01ba4d0b59
Merge pull request #4371 from yyforyongyu/expose-channel-constraints
lnrpc: expose all local and remote channel constraints
2020-07-01 16:45:35 -07:00
Olaoluwa Osuntokun
7cda30bfb4
Merge pull request #4167 from joostjager/hold-keysend
multi: hold keysend payments
2020-06-30 16:06:53 -07:00
yyforyongyu
f11da830b9 lnrpc: expose all local and remote channel constraints 2020-06-30 06:59:18 +08:00
Conner Fromknecht
eeea441c3c
Merge pull request #4405 from joostjager/interceptor-out
htlcswitch: expose additional data for intercepted packets
2020-06-29 11:35:20 -07:00
Joost Jager
2903505164
htlcswitch: expose custom records on intercepted packet 2020-06-27 11:00:46 +02:00
Joost Jager
363142de33
htlcswitch: expose additional fields for intercepted packets 2020-06-27 11:00:44 +02:00
Joost Jager
74db43282c
htlcswitch: encapsulate exposed packet info 2020-06-27 10:59:08 +02:00
Joost Jager
607927634d
routerrpc: remove redundant htlc prefix from proto field
The message name already sets the context to an htlc.
2020-06-27 10:59:06 +02:00
Joost Jager
f6f8e3221b
routerrpc: clarify proto fields to be outgoing 2020-06-27 10:59:04 +02:00
Joost Jager
24e3234dfa
invoices: optionally hold and auto-cancel keysend payments
Adds a new configuration flag to lnd that will keep keysend payments in
the accepted state. An application can then inspect the payment
parameters and decide whether to settle or cancel.

The on-the-fly inserted keysend invoices get a configurable expiry time.
This is a safeguard in case the application that should decide on the
keysend payments isn't active.
2020-06-27 09:54:11 +02:00
Conner Fromknecht
cff52f7622
Merge pull request #4352 from matheusdtech/discovery-lock-premature
discovery: correctly lock premature messages
2020-06-26 22:50:09 -07:00
Andreas M. Antonopoulos
61ea9fad78 New config option - disable height hint cache queries
typo broke test


leftover junk


Fix to comply with linter 

and also, D'oh conditional
2020-06-26 21:40:00 -04:00
Olaoluwa Osuntokun
feb300f102
Merge pull request #4407 from cfromknecht/gen-keysend-pay-addr
invoices/invoiceregistry: special-case payaddr index insertion for keysend
2020-06-26 16:38:19 -07:00
Wilmer Paulino
a998d5d647
Merge pull request #4106 from yyforyongyu/display-recovery-progress
multi: add a rpc endpoint to track the recovery process
2020-06-26 11:06:46 -07:00
Conner Fromknecht
20dea0d6bc
invoices/invoiceregistry: explicitly set blank pay addr for keysend 2020-06-26 02:17:18 -07:00
Conner Fromknecht
11e9fd3e92
channeldb/invoices: special-case all zeros pay addr
Avoids indexing the all-zeros pay addr, since it is still in use by
legacy keysend. Without this, the pay addr index will reject all but the
first keysend since they will be detected as duplicates within the set
id index.
2020-06-26 02:00:03 -07:00
yyforyongyu
987edc9d81 multi: add a rpc endpoint to track the recovery process 2020-06-25 15:49:54 +08:00
Conner Fromknecht
c1ef5bb908
Merge pull request #4410 from yyforyongyu/remove-fastsha256
htlcswitch: remove fastsha256 in test
2020-06-24 21:09:37 -07:00
yyforyongyu
0b573827ac htlcswitch: remove fastsha256 in test 2020-06-24 18:08:38 +08:00
Olaoluwa Osuntokun
1de7e30cd1
Merge pull request #4361 from yyforyongyu/add-channel-status
contractcourt: add ChannelStatus in MarkChannelClosed
2020-06-23 16:23:30 -07:00
Olaoluwa Osuntokun
bd1728606b
Merge pull request #4328 from joostjager/anchor-test-vectors
lnwallet/test: reproduce test vectors in commit and htlc tx test
2020-06-23 16:09:05 -07:00
Jasper Rädisch
20b42ce261 cmd/lncli: add fwdinghistory support for relative times
- introduces new parser in `cmd/lncli/arg_parse.go`
- converts start_time and end_time flags to strings
- adds default value for end_time
2020-06-23 15:58:23 -07:00
Conner Fromknecht
03b20cabd2
Merge pull request #4275 from cfromknecht/invoices-ntfn-order
invoices: ensure ntfns are sent in the same order
2020-06-22 12:15:07 -07:00
Joost Jager
8f2a2fc5da
Merge pull request #4018 from breez/intercept-forward-htlc
Intercept forward htlc
2020-06-22 10:18:14 +02:00
Olaoluwa Osuntokun
acc698a699
Merge pull request #4379 from Roasbeef/scb-union-bug-fix
chanbackup: always combine with on-disk state when swapping, refuse to start w/ invalid files
2020-06-18 18:49:28 -07:00
Conner Fromknecht
60a6f2ddd1
Merge pull request #4391 from matheusdtech/lnwire-zero-sid
lnwire: fix decoding for initial zero sid
2020-06-18 17:21:43 -07:00
Conner Fromknecht
47cf144170
invoices: ensure ntfns are sent in the same order
SettleHodlInvoice and CancelInvoice both notifyClients after
notifyHodlSubscribers. This commit changes UpdateInvoice to follow the
same pattern so that we are consistent.
2020-06-18 16:28:13 -07:00
Conner Fromknecht
f5581eb04a
Merge pull request #4370 from wpaulino/no-graph-restored-channels
channeldb: remove graph insertion of restored channels
2020-06-18 16:17:56 -07:00
Wilmer Paulino
8c79359247
Merge pull request #4395 from bmancini55/reply-channel-range-query
discovery: prevent endBlock overflow in replyChanRangeQuery
2020-06-18 15:19:52 -07:00
Wilmer Paulino
d808ec0d17
itest: add sync error to whitelist 2020-06-18 14:51:45 -07:00
Wilmer Paulino
d23be59f53
channeldb: remove graph insertion of restored channels
This was initially done as there were a few assertions throughout the
codebase requiring a channel's policy to be known. Now that these have
been addressed, we no longer need to store restored channels in the
graph, as their policies where incomplete anyway.
2020-06-18 14:51:44 -07:00
Brian Mancini
28931390ff discovery: prevent endBlock overflow in replyChanRangeQuery
Modifies syncer.replyChanRangeQuery method to use the LastBlockHeight
method on the query. LastBlockHeight safely calculates the ending
block height and prevents an overflow of start_block + num_blocks.

Prior to this change, query messages that had a start_block +
num_blocks that overflows uint32_max would return zero results in the
reply message.

Tests are added to fix the bug and ensure proper start and end values
are supplied to the channel graph filter.
2020-06-18 16:48:09 -04:00
Conner Fromknecht
5eb798a23e
Merge pull request #4365 from Crypt-iQ/chancloser_pkg_0609
lnwallet/chancloser: cooperative channel closure pkg
2020-06-18 13:38:41 -07:00