Commit Graph

8128 Commits

Author SHA1 Message Date
Johan T. Halseth
949f6c6cec
lnwire: remove ErrorCode encoding/decoding
Never sent on the wire.
2019-09-20 10:55:20 +02:00
Johan T. Halseth
ff37b711c6
funding: dont's send ErrorCode on wire
Since the ErrorCodes are not part of the spec, they cannot be read by
other implementations.

Instead of only sending the error code we therefore send the complete
error message. This will have the same effect at the client, as it will
just get the full error instead of the code indicating which error it
is. It will also be compatible with other impls.

Note that the GRPC error codes will change, since we don't set them
anymore.
2019-09-20 10:55:20 +02:00
Olaoluwa Osuntokun
20a5ee2f1e
Merge pull request #3519 from LightningK0ala/patch-4
Update Dockerfile go version to 1.13
2019-09-19 18:27:06 -07:00
Olaoluwa Osuntokun
796308a8a5
Merge pull request #3524 from fguisso/config-file
config: fix configfile flags
2019-09-19 18:25:42 -07:00
Olaoluwa Osuntokun
c978ebc7ac
Merge pull request #3369 from cfromknecht/eligible-to-forward-reestablish
htlcswitch/link: remove channel_reestablish timeout
2019-09-19 18:23:50 -07:00
Olaoluwa Osuntokun
f36a47e065
Merge pull request #3525 from cfromknecht/trimpath-for-release-only
Makefile+release: only use -trimpath on release script
2019-09-19 18:02:10 -07:00
Conner Fromknecht
da1b599d88
Makefile+release: only use -trimpath on release script
Allows lnd to still be compiled with go1.12.x, tho users with go1.13 can
still verify release binaries.
2019-09-19 14:34:38 -07:00
Conner Fromknecht
934b11fdac
Merge pull request #3509 from alrs/fix-lnwallet-test-goroutine
lnwallet: fix goroutines in tests
2019-09-19 14:01:45 -07:00
fguisso
2b7f9a3029 config: fix configfile flags 2019-09-19 17:05:56 -03:00
Conner Fromknecht
6585a56581
Merge pull request #3504 from alrs/fix-brontide-test-goroutine
brontide: fix test goroutine
2019-09-19 12:51:33 -07:00
Lars Lehtonen
a600d1eefe lnwallet: fix in-goroutine tests 2019-09-19 19:49:45 +00:00
Conner Fromknecht
3276bf2960
htlcswitch/link: remove channel reestablish deadline
Now that the link will remain ineligible until it receives
channel_reestablish from the remote peer, we can remove the channel
reestablish timeout entirely.
2019-09-19 12:47:08 -07:00
Conner Fromknecht
9d6ee2ebd9
htlcswitch/link: restrict EligibleToForward to wait for reestablish
This commit modifies the link's EligibleToForward() method only return
true once the peers have successfully exchanged channel reestablish
messages. This is a preliminary step to increasing the reestablish
timeout, ensuring the switch won't try to forward over links while
we're waiting for the remote peer to resume the connection.
2019-09-19 12:46:56 -07:00
Conner Fromknecht
6dca07577d
multi: move active/inactive ntfns from switch to link
Since we will now wait to deliver the event after channel reestablish,
notifying when the link is added to the switch will no longer be
sufficient. Later, we will add receiving reestablish as an additional
requirement for EligibleToForward returning true.

The inactive ntfn is also moved, to ensure that we don't fire inactive
notifications if no corresponding active notification was sent.
2019-09-19 12:46:44 -07:00
Conner Fromknecht
1d41d4d666
multi: move WaitPredicate, WaitNoError, WaitInvariant to lntest/wait 2019-09-19 12:46:29 -07:00
Conner Fromknecht
003441d7e9
build: adding missing unit test dep to go.sum 2019-09-19 12:46:17 -07:00
Johan T. Halseth
e4751f1361
Merge pull request #3517 from halseth/channel-point-log
lnwallet/channel: add missing chanpoint to log
2019-09-19 15:14:38 +02:00
Johan T. Halseth
c308042ae0
lnwallet/channel: add missing chanpoint to log 2019-09-19 10:40:32 +02:00
Olaoluwa Osuntokun
c69fc35a8e
Merge pull request #3515 from cfromknecht/default-wtclientrpc
make: compile wtclientrpc by default
2019-09-18 21:54:20 -07:00
Olaoluwa Osuntokun
003c576406
Merge pull request #3513 from halseth/lint-skip-generated
[trivial] lint: skip generated files
2019-09-18 21:51:16 -07:00
Olaoluwa Osuntokun
e6cd88e1bb
Merge pull request #3512 from halseth/chanarb-breach-close
[contractcourt] Gracefully advance channel arbitrator state machine on breach
2019-09-18 21:42:15 -07:00
Olaoluwa Osuntokun
53925a889e
Merge pull request #3522 from Roasbeef/rescan-fix-neutrino
build: update to latest version of neutrino
2019-09-18 21:10:08 -07:00
Olaoluwa Osuntokun
484e6df6a7 build: update to latest version of neutrino
In this commit, we update to the latest version of neutrino with a
series of important bug fixes in the core rescan logic.
2019-09-18 20:29:51 -07:00
Conner Fromknecht
7252e175dc
lncli+wtclientrpc: remove wtclientrpc build tag, compile by default 2019-09-18 17:26:15 -07:00
Olaoluwa Osuntokun
baa235c240
Merge pull request #3521 from cfromknecht/make-no-update
Makefile: remove -u when installing go-acc, consolidate dep installation
2019-09-18 16:37:13 -07:00
Conner Fromknecht
cd7610ff41
Makefile: remove linter version from pkg definition 2019-09-18 14:18:14 -07:00
Conner Fromknecht
4e5c4df098
Makefile: remove side-effects to go.mod when installing all deps
This commit applies the same cd /tmp prefix to installations for all
dependencies. It also corrects the previous behavior, which requires the
cd /tmp to be in the same command, and not separate statements.
2019-09-18 14:03:18 -07:00
Conner Fromknecht
ed8913f08a
Makefile: add verbose output to go get for linter 2019-09-18 14:01:49 -07:00
Conner Fromknecht
697974c9cf
Makefile: remove extraneous go install calls for module deps 2019-09-18 14:01:12 -07:00
Conner Fromknecht
a8130f0c40
Makefile: remove -u when installing go-acc 2019-09-18 13:43:35 -07:00
Lightning Koala
dcff77b63a
Update go version to 1.13
New go minimum version required is 1.13 as per [this change](https://github.com/lightningnetwork/lnd/pull/34589).
Docker build will fail due to missing trimpath.
2019-09-18 12:29:40 +01:00
Johan T. Halseth
ce9f7faff2
contractcourt/channel_arbitrator: handle breach channel at startup
Earlier the channel arbitrator would fail to recognize channels pending
close that were in the breached state. This lead to the state machine
not progressing correctly, and in some cases crashing since we would
attempt to force close an already closed channel.

A test TestChannelArbitratorForceCloseBreachedChannel is added to
exercise one of these scenarios.
2019-09-18 13:05:35 +02:00
Johan T. Halseth
26b7ec1b94
contractcourt/channel_arbitrator: define and react to breachClose
Earlier we would not react to breaches, as these are handled by other
subsystems. Now we advances our state machine in case of breach, such
that we'll gracefully exit, and won't have leftover state in case of a
restart.

A simple test TestChannelArbitratorBreachClose to exercise this behavior
is added.
2019-09-18 13:05:35 +02:00
Johan T. Halseth
504a910def
make: run linter on verbose 2019-09-18 09:07:53 +02:00
Johan T. Halseth
00d1890dd0
lint: skip files generated for mobile 2019-09-18 09:07:21 +02:00
Johan T. Halseth
1a4ba97562
Merge pull request #3274 from esneider/fix-typo-in-doc
Fix typo in doc
2019-09-18 08:37:06 +02:00
Wilmer Paulino
9e4c4c5041
Merge pull request #2084 from halseth/node-announcement-stale
Retransmit NodeAnnouncement on regular intervals
2019-09-17 11:37:05 -07:00
Johan T. Halseth
d9a55334dc
config: allow mainnet neutrino 2019-09-17 13:27:19 +02:00
Joost Jager
a0e91b5d41
channeldb: add forward fee calculation function 2019-09-17 11:11:02 +02:00
Joost Jager
fd63ed13ff
routing/route: add vertex constructor for hex string 2019-09-17 11:11:00 +02:00
Joost Jager
8c44cf4a22
channeldb: add ComputeFee function 2019-09-17 11:10:58 +02:00
Olaoluwa Osuntokun
cd3c2b508e
Merge pull request #3511 from lieteau2/patch-1
Rename chainnotifer_server.go to chainnotifier_server.go
2019-09-17 03:19:18 +03:00
Conner Fromknecht
551693e1b8
Merge pull request #3496 from joostjager/fix-incoming-dust
cnct: do not create an action for incoming dust htlcs
2019-09-16 12:31:37 -07:00
Conner Fromknecht
46586e2a4c
Merge pull request #3495 from halseth/router-not-starte-deadlock
chainntnfs: start concurrent queues prior to connection
2019-09-16 12:19:54 -07:00
lieteau2
0ea1b3484e
Rename chainnotifer_server.go to chainnotifier_server.go 2019-09-16 10:57:50 -05:00
Joost Jager
95502da7e8
Merge pull request #3414 from joostjager/report-accept-height
lnwire+htlcswitch: report htlc accept height
2019-09-16 13:49:29 +02:00
Johan T. Halseth
92123c603d
gossiper: retransmit self NodeAnnouncement 2019-09-16 10:54:42 +02:00
Johan T. Halseth
24004fcb37
gossiper+server: define SelfNodeAnnouncement 2019-09-16 10:54:42 +02:00
Johan T. Halseth
e36d15582c
discovery/gossiper test: add TestRetransmit
This commit adds a test that ensures outdated announcements are
retransmitted when the RetransmitTicker ticks.
2019-09-16 10:54:38 +02:00
Johan T. Halseth
70d63abe9f
discovery/test: set global test timestamp 2019-09-16 10:23:01 +02:00