Commit Graph

14128 Commits

Author SHA1 Message Date
positiveblue
c602ac07e7
chainntnfs: move cache implementation to channeldb
This commit moves the `HeightHintCache` implementation to the
`channeldb` package and inverts the dependency relation between
`chainntnfs` and `channeldb`.

Many packages depend on channeldb for type definitions,
interfaces, etc. `chainntnfs` is an example of that. `chainntnfs`
defines the  `SpendHintCache` and `ConfirmHintCache` interfaces but
it also implments them (`HeightHintCache` struct). The implementation
uses logic that should not leak from channeldb (ex: bucket paths).
This makes our code highly coupled + it would not allow us to use any
of these interfaces in a package that is imported by `channeldb`
(circular dependency).
2023-01-16 03:13:17 -08:00
Oliver Gugger
681da4b2b5
Merge pull request #7321 from bshramin/fix-selfsigned-typos
Fix typos in selfsigned.go
2023-01-16 09:54:08 +01:00
Oliver Gugger
e953034b83
Merge pull request #7325 from ellemouton/fixGomndLintError
lncli+docs: skip gomnd check in switch statement
2023-01-16 09:46:28 +01:00
Elle Mouton
097b4fae68
lncli+docs: skip gomnd check in switch statement 2023-01-16 09:55:07 +02:00
Amin Bashiri
88bccc9836 Fix typos in selfsigned.go [skip ci] 2023-01-15 15:13:29 -07:00
Oliver Gugger
143eba82ea
Merge pull request #7314 from yyforyongyu/fix-unit-test-mailbox
htlcswitch: fix test flake in `TestMailBoxAddExpiry`
2023-01-13 15:05:17 +01:00
Oliver Gugger
d108d7f741
Merge pull request #7315 from sputn1ck/lncli_ordinal_numbers
lncli/sendpayment: more descriptive failure log
2023-01-13 10:28:42 +01:00
sputn1ck
9f8fa3d8ed
lncli: more descriptive htlc failure case
This commit clarifies the htlc failure case in the lncli payment
command, by using the cardinal number as well as 'hop' in the
failure message.

[skip ci]
2023-01-12 17:58:15 +01:00
yyforyongyu
a1cac6d54b
htlcswitch: use mock clock in TestMailBoxAddExpiry
This commit replaces the clock used in the unit test
`TestMailBoxAddExpiry`. Previously the `TestClock` is used, resulting in
the unit test being not so "unit" as the maintainer needs to know the
detailed implementation of `clock.Clock`, resulting in debugging a
failed unit test more difficult as the cognitive cost is high.
Re-implement `clock.Clock` also means we need to maintain more. This is
now solved by using mock clock so we can ignore the implementation
details and care only the returned results.
2023-01-12 22:08:15 +08: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
yyforyongyu
31a40abd91
htlcswitch: improve loggings for Keystone 2023-01-12 22:08:02 +08:00
Oliver Gugger
6f0383bb4f
Merge pull request #7308 from hieblmi/code-sytle-cleanup
funding: code style cleanup in the funding package
2023-01-12 15:01:42 +01:00
Slyghtning
487cd96acc docs: update release notes 2023-01-12 22:41:35 +10:30
Slyghtning
b47cf7e871 funding: code style cleanup for the funding package 2023-01-12 22:40:51 +10:30
Oliver Gugger
b1645ec46d
Merge pull request #6783 from ErikEk/itest-neutrino-sub-server
itest: neutrino sub-server
2023-01-12 12:20:58 +01:00
Oliver Gugger
3dd9e04b8b
Merge pull request #7306 from YusukeShimizu/docs-invoice-default-expiry
Docs invoice default expiry
2023-01-12 10:29:07 +01:00
Oliver Gugger
79d5a01a81
Merge pull request #7310 from bitromortac/2301-queryprob-docs
routerrpc: update QueryProbability documentation
2023-01-12 10:23:09 +01:00
ErikEk
520c633938 docs: update release note 2023-01-12 13:43:55 +07:00
ErikEk
20fd630465 itest: test neutrino sub server 2023-01-12 13:43:41 +07:00
ErikEk
cc08271c5f itest: add neutrinoclient to harnessnode 2023-01-12 13:24:44 +07:00
bruwbird
71a5dab1a9
docs: add release notes 2023-01-12 09:17:47 +09:00
bruwbird
71f2615190
lnrpc: update invoice request expiry comment 2023-01-12 09:17:34 +09:00
bruwbird
380eb4af83
lncli: fix addinvoice expiry flag comment 2023-01-12 09:17:12 +09:00
bitromortac
045e5cf307
routerrpc: update QueryProbability documentation
Changes the docstring of QueryProbability to reflect changes that were
introduced in #6857.
2023-01-11 16:47:54 +01:00
Oliver Gugger
b1d6991b27
Merge pull request #7153 from carlaKC/7093-custommessage
multi: Add ability to handle protocol-range messages in Custom Message APIs
2023-01-11 09:52:40 +01:00
Oliver Gugger
ef8cf73d4c
Merge pull request #7295 from guggero/build-cache
GitHub: fix Golang build cache in actions
2023-01-06 14:11:34 +01:00
Oliver Gugger
f16a2f11df
docs: add release notes 2023-01-06 09:18:28 +01:00
Oliver Gugger
a074c801d1
GitHub: add job ID to cache key
To avoid the problem where multiple jobs try to create the same cache
entry, we add the GitHub job ID to the cache key.
The two restore keys make it possible that a job can also restore a
cache entry from another job if none for the current job exist yet.
2023-01-06 09:18:28 +01:00
Oliver Gugger
984fc3a2ec
GitHub: make setup-go action more versatile
With this commit we allow the Go version that is set up to be
configurable and not dependent on a specific environment variable. This
will allow us to eventually extract the action into a tooling
repository.
2023-01-06 09:18:26 +01:00
Oliver Gugger
c4ca7b99e2
GitHub: remove Go env variable override
For some reason we used to override the GOCACHE and GOPATH variables
earlier. This now causes the updated cache action not to pick up any
caches. As the overrides shouldn't be needed anymore, we remove them.
2023-01-06 09:18:16 +01:00
Carla Kirk-Cohen
19f013b5c4
release-notes: add send custom message override functionality 2023-01-05 12:06:25 -05:00
Carla Kirk-Cohen
1b1bc642bc
lntest/itest: add custom messaging itest including new override feature 2023-01-05 12:06:24 -05:00
Carla Kirk-Cohen
1cb08e42ef
lnrpc: update custom message API to explain ability to override 2023-01-05 12:05:06 -05:00
Carla Kirk-Cohen
c2ce8635e7
multi: add custom message overrides to protocol config options 2023-01-05 12:05:05 -05:00
Carla Kirk-Cohen
93dcbd7ea3
lnwire: allow overriding of protocol messages outside of custom range
Add the ability to specify messages < CustomRangeStart that will still
be treated like custom messages by lnd (rather than unknown ones). This
allows code external to lnd to handle protocol messages that are *not
yet known to lnd*.
2023-01-05 12:05:04 -05:00
Carla Kirk-Cohen
610f5d2140
lnwire: make custom type start a constant 2023-01-05 12:05:03 -05:00
Oliver Gugger
cfc48bd81c
Merge pull request #7272 from positiveblue/fix-7270
rpc: check that closing address matches the current network for open channel requests
2023-01-05 17:15:55 +01:00
Oliver Gugger
272ed415c2
Merge pull request #7289 from guggero/disable-thelper-linter
lint: disable `thelper` linter
2023-01-05 15:40:39 +01:00
Oliver Gugger
6585d5997a
docs: add release notes 2023-01-05 08:53:59 +01:00
Oliver Gugger
04dc37e463
lnwire: remove nolint comment 2023-01-05 08:49:31 +01:00
Oliver Gugger
99ebb67972
lint: disable thelper linter 2023-01-05 08:49:17 +01:00
Olaoluwa Osuntokun
e29a5a59ad
Merge pull request #7262 from bottlepay/fix-failure-tlv
lnwire: limit channel update reader
2023-01-04 18:41:44 -08:00
positiveblue
292ee1b123
docs: add release notes 2023-01-04 04:42:40 -08:00
positiveblue
2204cbfd30
rpc: validate closing channel address in open channel requests
Our OpenChannelRPC was accepting invalid values for the closing address
field. If we were able to decode the address we would use it in the
script even if the address is for another bitcoin net.
2023-01-04 04:42:39 -08:00
Joost Jager
3835b903a9
lnwire: limit channel update reader
Fixes a bug where channel update data is read until the end of the stream
rather than stopping after the specified length. This is problematic
when failure message tlv data is present, because this data is interpreted
as channel update tlv data.
2023-01-04 13:32:52 +01:00
Oliver Gugger
c03de26dcc
Merge pull request #7268 from ellemouton/avoidPanicInFundingTest
funding: check error to avoid panic during test
2023-01-03 16:32:32 +01:00
Oliver Gugger
3ffd3b2018
Merge pull request #7176 from b-ryan/fix-bumpfee-doc
Fix bumpfee command doc, incorrect reference to pendingsweeps
2023-01-03 11:22:52 +01:00
Oliver Gugger
73328bd449
Merge pull request #7271 from hieblmi/patch-4
docs: Fix lnd.conf typo
2023-01-03 11:08:48 +01:00
Slyghtning
c5fa9ef45f docs: Fix lnd.conf typo
Remove repeated word error [skip ci]
2022-12-28 20:37:03 +10:30
Elle Mouton
d4a49b08f5
funding: check error to avoid panic during test
This commit, the error returned from `getInitialFwdingPolicy` is checked
in order to avoid a nil pointer dereference panic during the
TestFundingManagerCustomChannelParameters test.
2022-12-22 10:06:42 +02:00