Commit graph

14749 commits

Author SHA1 Message Date
yyforyongyu
112dc1faca
funding: rename FundingLocked related functions and variables
This commit is created by running the following commands,
```shell
gofmt -d -w -r 'sendFundingLocked -> sendChannelReady' .

gofmt -d -w -r 'handleFundingLockedMtx -> handleChannelReadyMtx' .

gofmt -d -w -r 'handleFundingLockedBarriers -> handleChannelReadyBarriers' .

gofmt -d -w -r 'receivedFundingLocked -> receivedChannelReady' .

gofmt -d -w -r 'handleFundingLocked -> handleChannelReady' .

gofmt -d -w -r 'fundingLockedSent -> channelReadySent' .

gofmt -d -w -r 'checkPeerFundingLockInterval -> checkPeerChannelReadyInterval' .
```
2023-03-17 18:21:58 +08:00
yyforyongyu
2dc08a2a76
multi: rename NewFundingLocked to NewChannelReady
This commit is created by the following command,

```shell
gofmt -d -w -r 'NewFundingLocked -> NewChannelReady' .
```
2023-03-17 18:21:58 +08:00
yyforyongyu
c8e8358918
channeldb+lnwire: rename MsgFundingLocked to MsgChannelReady
This commit is created by running,

```shell
gofmt -d -w -r 'MsgFundingLocked -> MsgChannelReady' .

gco master channeldb/migration
```
2023-03-17 18:21:58 +08:00
yyforyongyu
1b7c56b2ed
multi: rename FundingLocked to ChannelReady
This commit is created by running,

```shell
gofmt -d -w -r 'FundingLocked -> ChannelReady' .

gco master channeldb/migration
```
2023-03-17 18:21:58 +08:00
Oliver Gugger
ae39cd9e91
Merge pull request #7514 from yyforyongyu/rpc-verbose-log
itest+rpcserver: fix itest flake in `3rd_party_anchor_spend`
2023-03-17 08:48:40 +01:00
yyforyongyu
ef4b5dba85
docs: update release note 2023-03-17 10:01:42 +08:00
yyforyongyu
9bd0dcd121
rpcserver: add debug log for rpc calls 2023-03-17 10:01:42 +08:00
yyforyongyu
c87da1ff01
itest: fix flake in testAnchorThirdPartySpend 2023-03-17 03:17:36 +08:00
Oliver Gugger
2e8dc7bf94
Merge pull request #7439 from ellemouton/bolt3-test-vectors
lnwallet: update Bolt3 test vectors
2023-03-16 18:47:19 +01:00
Oliver Gugger
2869b70808
Merge pull request #7059 from ellemouton/sessionFiltering
multi+towers: add ClientSessionFilterFn option
2023-03-16 16:58:04 +01:00
Oliver Gugger
b7697a7257
Merge pull request #7377 from positiveblue/split-update-invoice
channeldb: split `UpdateInvoice` logic
2023-03-16 16:39:29 +01:00
Elle Mouton
05793e5591
docs: add release note 2023-03-16 17:27:39 +02:00
Elle Mouton
b607db30f9
lnwallet: add zero-fee-htlc-tx test vectors 2023-03-16 17:27:05 +02:00
Elle Mouton
6774b72913
lnwallet: add same amount and preimage anchors test vector 2023-03-16 17:27:05 +02:00
Elle Mouton
a41f6d5a73
lnwallet: add same amount and preimage legacy test vector 2023-03-16 17:27:04 +02:00
Elle Mouton
4f14193ca9
lnwallet: add new htlc set for test vectors
Add a new test htlc set comprised of htlc 1 from the original set and
two new htlcs, 5 and 6, that use the same preimage and have the same
output value (in sats). This htlc set is used in tests that assert the
ordering of htlcs  that have the same preimage and output value.
2023-03-16 17:27:04 +02:00
Elle Mouton
dbc19b24e5
lnwallet: add funding amount assertion to tests
In this commit, an assertion is added to the bolt 3 commitment tx tests
that ensures that the local and remote balances add up to the expected
funding amount. Adding this assertion uncovered a borked test vector
which is also fixed in this commit.
2023-03-16 17:27:04 +02:00
Elle Mouton
09ff853b9c
lnwallet: lint bolt 3 test vectors func 2023-03-16 17:27:04 +02:00
Elle Mouton
15da50df10
lnwallet: remove dead code 2023-03-16 17:27:04 +02:00
Elle Mouton
b5d281dca8
lnwallet: run commitment tx tests in parallel 2023-03-16 17:27:03 +02:00
Elle Mouton
bc868fe270
docs: update release notes with 7059 2023-03-16 15:00:26 +02:00
Elle Mouton
b635629e3c
lnrpc/wtclientrpc: correctly merge tower client info
Prior to this commit, the wtclient would request tower info from both
the legacy client and the anchors client and would then merge the
results returned. This is incorrect since the two clients will have
different session info and different "active" statuses for the same
tower. This commit thus ensures that we dont lose this info.
2023-03-16 14:59:08 +02:00
Elle Mouton
c1be420696
watchtower: make use of the new ClientSessionFilterFn option
In this commit, the wtclient starts making use of the new
ClientSessionFilterFn to do any session filtering instead of doing it in
memory.
2023-03-16 14:59:08 +02:00
Elle Mouton
40ac82e439
watchtower: add ClientSessionFilterFn to session requests
In this commit, a new ClientSessionFilterFn parameter is added to the
DB's ListClientSession method which can be used to allow the caller to
specify a filter function for filtering sessions read from the DB.
Currently all filtering of sessions are done after the sessions have
been read from the DB, so adding this option should provide some
efficiency.
2023-03-16 14:59:08 +02:00
Oliver Gugger
8a2999c789
Merge pull request #7500 from yyforyongyu/coverage-test-flags
Makefile: add testing_flags to coverage test
2023-03-16 10:07:20 +01:00
Oliver Gugger
51680c5677
Merge pull request #7490 from yyforyongyu/replace-6417
Return FEE_INSUFFICIENT before checking balance for incoming low-fee HTLCs
2023-03-16 10:05:58 +01:00
Tommy Volk
7853cf0a43
docs: update release notes 2023-03-16 08:31:59 +08:00
yyforyongyu
4054ace4e1
htlcswitch: return FEE_INSUFFICIENT before checking balance 2023-03-16 08:30:38 +08:00
yyforyongyu
941a33af31
Makefile: add testing_flags to coverage test 2023-03-16 04:23:07 +08:00
positiveblue
034853a0a8
docs: add release notes 2023-03-14 19:26:18 -07:00
positiveblue
09e87ea99b
channeldb: add serializeAndStoreInvoice helper func 2023-03-14 19:26:18 -07:00
positiveblue
65fc8d72c6
channeldb: clean updateInvoice func
All the updates type are now catched in a switch statement, we can
delete the rest of the body of this function + add a default path for
not matched flows.
2023-03-14 19:26:18 -07:00
positiveblue
6ff6c45a6b
channeldb: split addHTLCs logic in the UpdateInvoice method 2023-03-14 19:26:18 -07:00
positiveblue
27fbc2f60b
channeldb: split cancelInvoice logic in the UpdateInvoice method 2023-03-14 19:26:15 -07:00
positiveblue
cbaec4382a
channeldb: split settleHodlInvoice logic in the UpdateInvoice method 2023-03-14 19:01:52 -07:00
positiveblue
a3f6d5c97e
channeldb: split cancelHTLCs logic in the UpdateInvoice method
Previous to this commit we were able to call `UpdateInvoice` with an
updated that added and cancelled htlcs at the same time. The function
returned an error if there was overlapping between the two htlc set.
However, that behavior was not used in the LND code itself.

Eventually we want to split this method in multiple ones, among them one
for canceling htlcs and another one for adding them. For that reason,
this behavior is not supported anymore.
2023-03-14 18:56:01 -07:00
Oliver Gugger
dbf667d8fc
Merge pull request #7511 from yyforyongyu/fix-state-check-itest
itest+lntest: make sure states are cleaned when tests end
2023-03-14 18:58:59 +01:00
yyforyongyu
20e53e85b4
itest+lntest: make sure states are cleaned when tests end
This commit changes how the node's state is updated to make sure the
test cleans up the node's state.

Also `testLookupHtlcResolution` is fixed with a cleanup.
2023-03-15 00:01:40 +08:00
Oliver Gugger
098bb36114
Merge pull request #7510 from guggero/fund-psbt-unconfirmed
lncli: allow specifying `--min_confs` in `wallet psbt fund` to select unconfirmed inputs
2023-03-14 13:45:05 +01:00
positiveblue
84387992ec
invoices: add UpdateType to InvoiceUpdateDesc
Make the kind of update explicit in the `InvoiceUpdateDesc` struct.
2023-03-13 13:11:06 -07:00
Oliver Gugger
1ed63a85b3
docs: add release notes 2023-03-13 12:46:05 +01:00
Oliver Gugger
1a3be78471
cmd/lncli: add --num_confs to wallet psbt fund command 2023-03-13 12:45:58 +01:00
Oliver Gugger
fe24f195b8
Merge pull request #7508 from positiveblue/fix-linter
multi: make linter happy
2023-03-13 10:04:26 +01:00
positiveblue
4a0a15586b
multi: make linter happy
Fix all the linter problems for the `v0.16.0-beta.rc3`.
2023-03-11 23:29:41 -08:00
Olaoluwa Osuntokun
840c939464
build: bump version to v0.16.0-rc3 2023-03-10 19:09:32 -08:00
Olaoluwa Osuntokun
75ee5574a9
Merge pull request #7448 from Roasbeef/tx-rebroadcaster
lnwallet: add new rebroadcaster interface, use for background tx publish
2023-03-10 19:08:38 -08:00
Olaoluwa Osuntokun
8754547ded
lnwallet: add tests for the new rebroadcaster logic
We needed to copy some mocks from elsewhere in the codebase, as
otherwise we'd run into an import cycle.
2023-03-10 19:07:50 -08:00
Olaoluwa Osuntokun
e007125f78
lnutils: add RecvOrTimeout
This abstracts out a common pattern where we wait for a send on a
channel, and timeout otherwise.
2023-03-10 19:07:45 -08:00
Olaoluwa Osuntokun
6b8a1f1d67
docs/release-notes: add note for new tx rebroadcast 2023-03-10 19:07:42 -08:00
Olaoluwa Osuntokun
42343184f4
lnd: hook up neutrino's rebroadcaster for full node backends
Neutrino already runs this rebroadcaster in the background, so we don't
need to create it again if we're running in that operating mode.
2023-03-10 19:07:40 -08:00