Commit graph

14729 commits

Author SHA1 Message Date
yyforyongyu
76ba68091f chainntnfs: patch unit tests for mempool notifier 2023-04-18 18:28:28 -07:00
yyforyongyu
35d1bff321 chainntnfs: add method UnsubscribeEvent to cancel a subscription
This commit adds the method `UnsubscribeEvent` to cancel a single
subscription.
2023-04-18 18:28:27 -07:00
yyforyongyu
318efa4c33 chainntnfs: allow multiple subscriber to the same input
This commit changes the `subscribedInputs` to store a map of subscribers
so multiple subscribers are allowed to receive events from the same
outpoint.
2023-04-18 18:28:27 -07:00
yyforyongyu
208628d7f2 chainntnfs: introduce mempool notifier
This commit adds a mempool notifier which notifies the subscriber the
spending event found in the mempool for a given input.
2023-04-18 18:28:27 -07:00
Olaoluwa Osuntokun
28ab3d5ccb Merge branch 'v0-16-1-branch-rc1-7597' into v0-16-1-branch-rc1 2023-04-18 18:27:36 -07:00
Oliver Gugger
a53b0a483c docs: add release notes 2023-04-18 18:27:36 -07:00
Oliver Gugger
24e1a0ec7d peer: add TODO about initial forwarding policy
The right way to solve the problem of the link not being up to date with
custom user set forwarding policies once the channel is announced would
be to pass in those custom values when the link is created initially.
This requires a bit more of a refactor and is not addressed in this bug
fix.
2023-04-18 18:27:36 -07:00
Oliver Gugger
3c4ba857cc itest: update channel open test to send payment
This commit enhances the custom fee policy channel open test by adding a
second channel and testing forwarding payments through the channel with
the custom forwarding policies.
This was able to reproduce the bug reported in #5796 which was fixed in
a previous commit of this PR.
2023-04-18 18:27:36 -07:00
Oliver Gugger
4cf9d7c982 itest: move lnd_custom_{message => message_test}.go
This recently added file didn't follow the golang naming convention for
tests.
2023-04-18 18:27:36 -07:00
Oliver Gugger
a74793ecbc funding+server: update switch after sending channel update
With this commit we give the funding manager the ability to inform the
switch about custom channel policies, right after we've announced the
channel to the network.
This change is necessary because before #6753 a channel could only be
opened with the default forwarding policies, so the switch automatically
had the "correct" default values. Since #6753 added the ability to
specify forwarding policies at channel open time, we announced those
policies to the network but never updated the switch to inform it about
the changed policies (previously changing the policies was only possible
through the UpdateChannelPolicy RPC which did call the switch).
2023-04-18 18:27:36 -07:00
Oliver Gugger
16f428f580 funding: refactor manager test 2023-04-18 18:27:36 -07:00
Olaoluwa Osuntokun
a49671d076 Merge branch 'v0-16-1-branch-rc1-7604' into v0-16-1-branch-rc1 2023-04-18 18:27:05 -07:00
ziggie
261461deeb docs: update release notes 2023-04-18 18:27:05 -07:00
ziggie
7ab6eb1140 netann: fix logging output 2023-04-18 18:27:05 -07:00
Olaoluwa Osuntokun
70bad093a9 Merge branch 'v0-16-1-branch-rc1-7603' into v0-16-1-branch-rc1 2023-04-18 18:26:44 -07:00
Torakushi
4e402082b3 update release-notes-0.16.1 2023-04-18 18:26:44 -07:00
Torakushi
02be618935 funding: use p2tr by default for batch_open_channel
In LND v0.15.1, batch_open_channel used p2tr by default
for change output. However, in a later version, a breaking
change has been fixed in FundPSBT to make the change type
configurable (default to p2wkh). As batch_open_channel
uses FundPsbt, we need to put back p2tr as default for
change output
2023-04-18 18:26:44 -07:00
Olaoluwa Osuntokun
239fda1894 Merge branch 'v0-16-1-branch-rc1-7473' into v0-16-1-branch-rc1 2023-04-18 18:24:42 -07:00
Emilio Ziniades
32b117b9df lnrpc: test witness type mapping 2023-04-18 18:24:42 -07:00
Emilio Ziniades
43660c2c31 input: note to update witness type protobuf 2023-04-18 18:24:42 -07:00
Emilio Ziniades
aca89c38aa lnrpc: add allWitnessTypes map
Refactor `PendingSweeps` to use `allWitnessTypes` map, and
return an error from `PendingSweeps` if an unknown witness
type is used, instead of logging a warning.
2023-04-18 18:24:42 -07:00
Emilio Ziniades
44dcfec947 lnrpc: update and regenerate witness type proto 2023-04-18 18:24:42 -07:00
Olaoluwa Osuntokun
cf88d105f3 Merge branch 'v0-16-1-branch-rc1-7464' into v0-16-1-branch-rc1 2023-04-18 18:24:01 -07:00
Oliver Gugger
91448274fa docs: add release notes 2023-04-18 18:24:01 -07:00
Oliver Gugger
2509000878 channeldb: use input.GenMultiSigScript 2023-04-18 18:24:01 -07:00
Oliver Gugger
7401de3348 input: set initial script allocation size
The default allocation of 500 bytes for the script that is
used in NewScriptBuilder is way too much for most of our scripts.
With the new functional option we can tune the allocation to exactly
what we need.
2023-04-18 18:24:01 -07:00
Oliver Gugger
020d79f18e input: add script size unit and benchmark tests 2023-04-18 18:24:01 -07:00
Oliver Gugger
3a4ab10806 mod: bump btcd version 2023-04-18 18:24:01 -07:00
Olaoluwa Osuntokun
6c8932a4e1 Merge branch 'v0-16-1-branch-rc1-7593' into v0-16-1-branch-rc1 2023-04-18 18:23:25 -07:00
Oliver Gugger
a7815b29f5 docs: update remote signing docs
With this commit we update the docs according to the latest changes that
were necessary to support loop and pool (which requires all 255
internally used accounts to be imported at wallet creation time).

Fixes #7567.
2023-04-18 18:23:25 -07:00
Olaoluwa Osuntokun
b129e10da3 Merge branch 'v0-16-1-branch-rc1-7588' into v0-16-1-branch-rc1 2023-04-18 18:23:03 -07:00
Olaoluwa Osuntokun
d5be710b95 config: fix bug in walletrpc interaction due to mismatched coin type
In this commit, we fix a bug that would cause the walletrpc on the
simnet chain to not be able to respond to all RPC calls. The issue is
that for the SimNet backend, within chainparams.go:
6e0a67d05b/chainreg/chainparams.go (L45-L51),
we set a new CoinType for Simnet in order to match the RegTest value.

Later on, when we go to verify the on disk accounts against the
in-memory cointype, we fall through to an error case as the in-memory
cointype is 115, while the on disk cointype is 1.

To fix this, when we know we're doing simnet mode, we'll override the
cointype similar to the way we did/do for LTC.

Fixes https://github.com/lightningnetwork/lnd/issues/6807.
2023-04-18 18:23:03 -07:00
Olaoluwa Osuntokun
350f4293c7 Merge branch 'v0-16-1-branch-rc1-7513' into v0-16-1-branch-rc1 2023-04-18 18:22:32 -07:00
Oliver Gugger
c95205a94f docs: add release notes 2023-04-18 18:22:32 -07:00
Olaoluwa Osuntokun
2ded805858 Merge branch 'v0-16-1-branch-rc1-7563' into v0-16-1-branch-rc1 2023-04-18 18:21:49 -07:00
yyforyongyu
0b8ac4870d lnutils: add unit test for SyncMap 2023-04-18 18:21:49 -07:00
yyforyongyu
3d167b2687 lnutils: add methods ForEach, Len and LoadOrStore to SyncMap 2023-04-18 18:21:49 -07:00
Olaoluwa Osuntokun
86fb0d7b51 Merge branch 'v0-16-1-branch-rc1-7442' into v0-16-1-branch-rc1 2023-04-18 18:21:24 -07:00
84adam
2115e338ca docs: add notes on contents of Postgres DB as Key-Value store to Postgres.md 2023-04-18 18:21:24 -07:00
Olaoluwa Osuntokun
eba78e6786 Merge branch 'v0-16-1-branch-rc1-7582' into v0-16-1-branch-rc1 2023-04-18 18:20:58 -07:00
Olaoluwa Osuntokun
39cc227d0d build: update build system to Go 1.20.3 2023-04-18 18:20:58 -07:00
Olaoluwa Osuntokun
36b7dc6c17 Merge branch 'v0-16-1-branch-rc1-6903' into v0-16-1-branch-rc1 2023-04-18 18:19:16 -07:00
Slyghtning
326c4f2c55 docs: update release notes 2023-04-18 18:19:16 -07:00
Slyghtning
a1cd4eafbd funding unit: fundmax sanity check for new channel commitment types. 2023-04-18 18:19:16 -07:00
Slyghtning
c5f48e6079 itest: respect the reserved wallet balance when using fundmax 2023-04-18 18:19:16 -07:00
Bjarne Magnussen
ac7a391732 chanfunding: allow to set a reserved amount not used for funding 2023-04-18 18:19:16 -07:00
Bjarne Magnussen
5c3b1724ab lntest/itest: adds tests for fundmax flag of cli:openchannel 2023-04-18 18:19:15 -07:00
Slyghtning
c1a9d15a82 lncli: fundmax flag for openchannel 2023-04-18 18:19:15 -07:00
Slyghtning
238ef0d2eb lnd+lnwallet: fundmax flag for openchannel 2023-04-18 18:19:15 -07:00
Bjarne Magnussen
26b23e2af0 lnd: handles the FundMax field inside parseOpenChannelReq
Adds handling of the `FundMax` field when parsing an
`OpenChannelRequest` with `rpcServer.parseOpenChannelReq`.
2023-04-18 18:19:15 -07:00