Commit Graph
13797 Commits
Author SHA1 Message Date
Joost Jager 01e7f09dfb rpcserver: extract marshalDBRoutingPolicy 2022-10-25 15:24:48 +02:00
Oliver Gugger c4f4630902 Merge pull request #7076 from yyforyongyu/tune-linters
golangci: fine-tune enabled linters
2022-10-25 09:44:57 +02:00
yyforyongyu f27364f467 golangci: customize dupl, funlen, nestif, and nlreturn [skip ci] 2022-10-25 14:11:56 +08:00
yyforyongyu a5f57c6c3e golangci: disable linters to match our code style 2022-10-25 02:54:48 +08:00
Oliver Gugger d9e32f39c2 Merge pull request #7064 from yyforyongyu/fix-linter
lint: enable line too long check and other linters
2022-10-24 09:21:57 +02:00
Oliver Gugger bac7e6360e Merge pull request #7056 from guggero/watch-only-seed-birthday
wallet: use correct birthday timestamp when creating watch-only wallet
2022-10-24 09:21:27 +02:00
yyforyongyu 87ac3a928c docs: update release note 2022-10-21 17:19:12 +08:00
yyforyongyu 2fa2f24700 golangci: enable new linters
Only newly added code will trigger these linter checks.
2022-10-20 23:59:10 +08:00
yyforyongyu 4db6617d45 multi: skip checking long lines for config files 2022-10-20 23:59:09 +08:00
yyforyongyu 3e593be053 golangci: enable linter lll for long line check
Enables "line too long" check for new code.
2022-10-20 23:59:04 +08:00
Oliver Gugger 8c66353e4c Merge pull request #7001 from hieblmi/fwdinghistory-alias-info
lncli: incoming and outgoing peer alias in `fwdinghistory`
2022-10-20 17:16:47 +02:00
Oliver Gugger dfc526b8b4 Merge pull request #7025 from ellemouton/cantRemoveTowerDuringNegotiation
watchtower: introduce an AddressIterator
2022-10-20 16:57:38 +02:00
Elle Mouton ca05335083 docs: update release notes with #7025 2022-10-20 15:46:57 +02:00
Elle Mouton 3ff5abc9e3 watchtower: allow removal during session negotiation
In this commit, the bug demonstrated in the previous commit is fixed.
The locking capabilities of the AddressIterator are used to lock
addresses if they are being used for session negotiation. So now, when a
request comes through to remove a tower address then a check is first
done to ensure that the address is not currently in use. If it is not,
then the request can go through.
2022-10-20 15:46:56 +02:00
Elle Mouton b2039f245e watchtower: demo cant remove tower during negotiation bug
In this commit, a new test is added to demonstrate that an error is
thrown if a user attempts to remove a tower during session negotiation
even if no current negotiation is taking place with the tower.
2022-10-20 15:46:55 +02:00
Elle Mouton 8a7329b988 watchtower: make use of the new AddressIterator
This commit upgrades the wtclient package to make use of the new
`AddressIterator`. It does so by first creating new `Tower` and
`ClientSession` types. The new `Tower` type has an `AddressIterator`
instead of a list of addresses. The `ClientSession` type contains a
`Tower`.
2022-10-20 15:46:52 +02:00
Elle Mouton 7924542500 watchtower: add AddressIterator and tests
In this commit, a new AddressIterator type is added. It is a type that
can be used to iterate over a list of addresses. It strictly disallows
the list of addresses it holds to be empty. It also allows callers to
place locks on certain addresses in order to prevent other callers from
removing the addresses in question from the iterator.
2022-10-20 15:46:03 +02:00
Slyghtning 2189bb4ba6 docs: update release notes 2022-10-20 09:23:50 -04:00
Slyghtning 85f0ec2954 itest: check peer alias in ForwardingHistory 2022-10-20 09:23:50 -04:00
Slyghtning 3e4c98c938 rpcserver: enrich ForwardingHistory with peer alias
In this commit a helper method in ForwardingHistory is introduced that enriches
each ForwardingEvent by peer alias names for the incoming and outgoing channel.
2022-10-20 09:23:47 -04:00
Elle Mouton 5bc8ee48fc watchtower: demo that client cant update tower address
In this commit, a test is added to demonstrate that if a client tries to
update the address of a tower for an active tower session, then this new
address will not be used until the client restarts. This is a bug that
will be fixed in a future commit.
2022-10-20 11:32:08 +02:00
Elle Mouton 60f58b7812 watchtower: simplify the newHarness test function 2022-10-19 18:49:18 +02:00
Elle Mouton 4828fd902d wtclient: allow multiplie callback dial functions
This commit is a step towards prepping the watchtower client test
harness to be able to handle the case where the client connects to
multiple mock servers.
2022-10-19 18:49:18 +02:00
Elle Mouton ab4d4a19be watchtower/wtclient: upgrade pkg to use require
Upgrade all the tests in the wtclient package to make use of the
`require` package.
2022-10-19 18:49:17 +02:00
Elle Mouton d29a55bbb5 watchtower: make use of t.Cleanup funcs in tests
Make use of the t.Cleanup helper function to clean up watchtower client
tests instead of relying on defer calls.
2022-10-19 18:39:26 +02:00
Oliver Gugger 7274cf40d0 Merge pull request #6831 from bottlepay/interceptor-watchdog
htlcswitch: interceptor watchdog
2022-10-18 19:11:00 +02:00
Joost Jager a0a50fa844 htlcswitch: auto-fail held htlcs
Make the interceptable switch aware of htlc expiry and fail back htlcs in-time
to prevent the counterparty from force-closing the channel.
2022-10-18 18:06:49 +02:00
Joost Jager 74eeb95e8c htlcswitch: add error return value to NewInterceptableSwitch
Prepares for parameter validation.
2022-10-18 18:04:34 +02:00
Joost Jager 93a7cab46e htlcswitch/test: create interceptableSwitchTestContext
Refactor to prepare for adding more tests.
2022-10-18 18:04:34 +02:00
Joost Jager 9c063db698 htlcswitch: add heldHtlcSet
Isolation of the set logic so that it will be easier to add watchdog functionality later.
2022-10-18 18:04:33 +02:00
Joost Jager a6df9567ba htlcswitch: add dedicated block subscription to interceptable switch
Preparation for making the interceptable switch aware of expiring htlcs.
2022-10-18 18:04:33 +02:00
Joost Jager 4a3e90f4d0 htlcswitch: add InterceptableSwitchConfig
Preparation for adding more config options.
2022-10-18 18:04:33 +02:00
Slyghtning 2db62c18a1 lncli: add flag skip_peer_alias_lookup to fwdinghistory
A new flag skip_peer_alias_lookup is introduced that communicates to the
server if the peer alias lookup per forwarding event should be skipped
in order to improve performance.
2022-10-18 11:08:03 -04:00
Slyghtning 425ce55968 lnrpc: peer_alias_in and peer_alias_out fields for ForwardingEvent 2022-10-18 11:08:00 -04:00
Oliver Gugger 95bb1999b9 docs: add release notes 2022-10-18 15:48:30 +02:00
Oliver Gugger 4fbd608b73 Merge pull request #7050 from positiveblue/build-info
[skip ci] build: fix makefile targets using `RELEASE_LDFLAGS`
2022-10-18 13:36:19 +02:00
Oliver Gugger b17a2deaf4 config_builder: use correct birthday when creating watch-only wallet 2022-10-18 13:29:09 +02:00
positiveblue 85d88cd004 [skip ci] build: fix makefile targets using RELEASE_LDFLAGS
I forgot the `-ldflags` before setting the ldflags for the `install`
target.
2022-10-18 02:06:15 -07:00
Olaoluwa Osuntokun c65abf8b05 Merge pull request #6759 from yyforyongyu/1-new-itest
itest: start a scaffolding testing framework
2022-10-17 20:06:48 -07:00
Olaoluwa Osuntokun 609cc8b883 lnd: add SECURITY.MD to bolster security entry in README 2022-10-17 12:05:15 -07:00
Oliver Gugger db42e63ab7 Merge pull request #7046 from C-Otto/watchtower-docu-fixes
watchtower: docu fixes
2022-10-17 18:05:26 +02:00
Oliver Gugger f68d047a26 Merge pull request #6963 from positiveblue/build-info
build: get binary build info from `debug/buildinfo`
2022-10-17 10:04:33 +02:00
positiveblue a92d7ad6d3 docs: update release notes for v0.16.0-beta 2022-10-17 00:55:16 -07:00
positiveblue 5924964a9b build: get binary build info from debug/buildinfo
Since `go1.18` the runtime has a package that provides information about module
versions, version control information, and build flags embedded in executable
files built by the go command.

The new packages allows us to get information needed by the `version` command
without having to rely on `ldflags` set at build time.

This can be really helpful while debugging errors from people using custom
binaries. For example a build from master.
2022-10-17 00:52:37 -07:00
Carsten Otto 378478eb1a multi: fix typos and grammar issues in comments [skip ci] 2022-10-17 09:40:22 +02:00
Carsten Otto 2a56f602db wtclient: fix documentation [skip ci]
the implementation also returns exhausted sessions
2022-10-17 09:40:22 +02:00
Oliver Gugger 27fdd0a5b0 Merge pull request #7048 from benthecarman/fix-comment
lnrpc: fix description of tx_index to be correct
2022-10-17 09:33:52 +02:00
benthecarman 4607dff2c3 lnrpc: fix description of tx_index to be correct[skip ci] 2022-10-16 19:59:40 -05:00
yyforyongyu ff0b953fa2 docs: add release note for the new itest 2022-10-14 15:45:25 +08:00
yyforyongyu b312ae24aa lntemp: add README 2022-10-14 15:45:25 +08:00