Commit Graph

41 Commits

Author SHA1 Message Date
yyforyongyu
5bea444b6d
golangci: remove linter exceptions for itest 2023-02-23 21:56:12 +08:00
yyforyongyu
edba938996
multi: add new build tag integration
This commit adds a new build tag `integration` and removes the old tag
`rpctest` for clarity. Multiple unnecessary usages of `build !rpctest`
is also removed.
2023-02-23 21:56:09 +08:00
Oliver Gugger
3012f5e17d
mod+internal: copy MuSig2 v0.4.0 code from btcd/btcec/v2
With this commit we copy the exact code of the MuSig2 code as found in
github.com/btcsuite/btcec/v2/schnorr/musig2 at the tag btcec/v2.2.2.
This corresponds to the MuSig2 BIP specification version of v0.4.0.
2023-02-03 18:30:09 +01:00
Chris Geihsler
a5eaabf548
multi: add sqlite option to itests and github job 2023-01-25 14:16:56 +02:00
Oliver Gugger
a306cbdec9
lint: disable gomnd 2023-01-17 19:20:57 +01:00
yyforyongyu
5e6f10c9b8
lnmock: add new package lnmock to host mocks
This commit introduces a new package to host mocked objects that can be
used for all the unit tests.
2023-01-12 22:08:02 +08:00
Oliver Gugger
99ebb67972
lint: disable thelper linter 2023-01-05 08:49:17 +01:00
yyforyongyu
39b972afe0
golangci: update version to v1.50.1
This commit updates the tool `golangci-lint` to the latest version that
has fixed a bug in the linter `paralleltest`. Also `go mod tidy` is run
inside `tool`, and `nosnakecase` is disabled as it's deprecated.
2022-11-18 19:42:38 +08:00
yyforyongyu
b68ac6acdc
golangci: update gomnd config 2022-11-17 21:06:13 +08: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
yyforyongyu
2fa2f24700
golangci: enable new linters
Only newly added code will trigger these linter checks.
2022-10-20 23:59:10 +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
da75619245
golangci: disable new exhauststruct rule
A new linter rule was added in the latest version that wants all fields
in a struct to be declared, even if the default value is used. Because
that would mean a large diff for us, we disable the rule for now.
2022-07-14 09:29:34 +02:00
Olaoluwa Osuntokun
12b82d0156
Merge pull request #5652 from ErikEk/neutrino-sub-server
Neutrino sub-server
2022-05-03 16:01:24 -07:00
ErikEk
635cffa871 multi: add sub-server dep 2022-04-30 08:55:49 +02:00
Oliver Gugger
dfac94bf9b
tools+lint: fix linter for Go 1.18 2022-04-29 09:34:14 +02:00
positiveblue
e4e0935816
lnrpc/peers: skeleton logic for updateNodeAnnouncement
Basic logic for the endpoint:

- Get the current nodeAnn information
- Calculate modifications
- Apply modifications
- Return changes
2022-04-01 18:36:21 -07:00
Oliver Gugger
8d83778314
tools+golangci-lint: enable fixed version of whitespace linter 2022-02-15 11:16:19 +01:00
Oliver Gugger
369627901f
lint+tools: bump version of golangci-lint 2022-02-10 11:02:01 +01:00
Andras Banki-Horvath
d059f78b4d
build: add dev tag to the linter config 2022-01-24 17:43:00 +01:00
naveen
87a0e52464
multi: Removed deprecated interfacer linter
Removed the deprecated interfacer linter from being called for linting.

Also removed the `nolint:interfacer` within the code.

https://github.com/lightningnetwork/lnd/issues/5741
2022-01-11 14:08:18 +01:00
Oliver Gugger
c8df606427
GitHub+lint: reduce linter memory usage
To reduce the likelyhood of the linter OOMing on the GitHub runner, we
exclude any generated code from being inspected and also tune the golang
garbage collector to be a bit more agressive.
2021-07-27 13:09:59 +02:00
Johan T. Halseth
7569cca19b
channeldb/migration: copy current lnwire to migration dir
To avoid code changing underneath the static migrations, we copy the
lnwire dependency in its current form into the migration directory.

Ideally the migrations doesn't depend on any code that might change,
this takes us a step closer.
2021-02-24 14:34:57 +01:00
Oliver Gugger
1558edbc3c
travis+lint: fix memory usage
There is a setting to control how often the garbage collector is run.
Apparently this is a tradeoff between CPU and memory usage. If we can
limit the memory being used in that way, this allows us to use multiple
worker again, so overall this shouldn't be much slower than before.
2020-09-21 21:17:46 +02:00
Olaoluwa Osuntokun
719e32830d
lntest: fix most linter warnings, silence rest
We fix all linter issues except for the 'lostcontext' and 'unparam' ones
as those are too numerous and would increase the diff even more.
Therefore we silence them in the itest directory for now.
Because the linter is still not build tag aware, we also have to silence
the unused and deadcode sub linters to not get false positives.
2020-09-21 21:16:31 +02:00
Conner Fromknecht
0b49783650
Merge pull request #4124 from halseth/travis-lint-concurrency
travis+lint+make: limit lint concurrency only on travis
2020-03-31 16:09:50 -07:00
Joost Jager
ffa7bed7f0
build+routerrpc+lncli: remove routerrpc conditional compilation 2020-03-31 21:41:22 +02:00
Johan T. Halseth
73c542c934
travis+lint+make: limit lint concurrency only on travis
Since linting is much faster by using the defaults locally.
2020-03-31 10:27:44 +02:00
fguisso
3b5d12fd6c make: remove remaining wtclientrpc flags 2020-02-18 10:23:39 -03:00
Steven Roose
2fb7172725
lnwire: Add upfront shutdown messages and feature bit
This commit adds the feature bit and additional fields
required in `open_channel` and `accept_channel` wire
messages for `option_upfront_shutdown_script`.
2019-12-03 11:38:21 +02:00
Olaoluwa Osuntokun
38e313a869
Merge pull request #3633 from joostjager/safe-migrations
channeldb: isolate migrations
2019-11-01 18:28:56 -07:00
carla
1e86589bee chanfitness: Add channel event store
This commit adds a channel event store to the channel fitness
package which is used to manage tracking of a node's channels.
It adds tracking for channel open/closed and peer online/offline
events for all channels that a node has open.

Events are consumed from channelNotifier and peerNotifier event
subscriptions. If either of these subscriptions is cancelled,
channel scoring stops, because both subscriptions are expected
to run until node shutdown.

Two functions are exposed to allow external callers to get uptime
information about a channel. GetLifespan returns the period over
which the channel has been monitored. GetUptime returns the channel's
uptime over a specified period. Callers can use these functions to
get the channel's remote peer uptime over its entire lifetime, or
a subset of that period.
2019-10-25 09:55:09 +02:00
Joost Jager
6e463c1634
channeldb: make copy for migrations
This commit is a direct copy of the complete channeldb package. It only
changes the package declaration at the top of every file. We make this
full copy so that review can be focused on the actual changes made.
Otherwise changes may drown in all the file moves.

Linting for the new package is disabled, as it contains lots of
pre-existing issues.
2019-10-24 12:49:38 +02:00
Olaoluwa Osuntokun
16941d7aad
build: nerf linter 2019-09-25 16:05:31 -07:00
Johan T. Halseth
00d1890dd0
lint: skip files generated for mobile 2019-09-18 09:07:21 +02:00
Joost Jager
23517587aa
build: disable funlen 2019-09-13 14:11:32 +02:00
Joost Jager
5249a21a65
build: enable linters for future changes 2019-09-12 21:16:38 +02:00
Joost Jager
51f2096dbd
build: enable unused linting 2019-09-10 17:22:05 +02:00
Joost Jager
e64542aa1c
build: lint with build tags 2019-09-10 17:22:03 +02:00
Johan T. Halseth
3207c8a736
make: change linter gometalinter->golangci-lint 2019-08-07 10:53:09 +02:00