Commit graph

14826 commits

Author SHA1 Message Date
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
Olaoluwa Osuntokun
10929d80cc
lnwallet: add new rebroadcaster interface, use for background tx publish
In this commit, we add a new Rebroadcaster interface to be used for
publishing transactions passively in the background until they've been
confirmed on chain. This is useful if a tx drops out of the mempool, but
then the pool clears down and has more space available to accept the tx
at the current fee level.
2023-03-10 19:07:35 -08:00
Oliver Gugger
dcf69169e5
Merge pull request #7492 from yyforyongyu/gossip-add-log
Add trace logs for `discovery` to catch test flakes
2023-03-09 12:52:01 +01:00
Oliver Gugger
d5942bf692
Merge pull request #7499 from Roasbeef/bump-go-version
build: bump min Go version to 1.19
2023-03-09 10:35:47 +01:00
Olaoluwa Osuntokun
0bbbd9b911
build: bump min Go version to 1.19
Fixes https://github.com/lightningnetwork/lnd/issues/7495
2023-03-08 18:02:57 -08:00
yyforyongyu
b8373f5628
lntest: use trace log level for discovery 2023-03-08 21:03:37 +08:00
yyforyongyu
f22b25a1bf
discovery+server: add more trace log 2023-03-08 21:02:53 +08:00
Oliver Gugger
a28fbd4690
Merge pull request #7491 from ellemouton/fillInTowerToSessionIDIndex
watchtower/wtdb: add tower-to-session index entry for all towers
2023-03-08 13:17:05 +01:00
Oliver Gugger
ca3debf351
Merge pull request #7483 from ellemouton/fixNoErrorFunc
multi: fix wait.NoError and sub-test names
2023-03-08 10:42:41 +01:00
Elle Mouton
f6ef3db6ea
watchtower/wtdb: add tower-to-session index entry for all towers
In this commit, a small migration is added to the watchtower client DB
to ensure that there is an entry in the towerID-to-sessionID index for
all towers in the db regardless of if they have sessions or not. This is
required as a follow up to migration 1 since that migration only created
entries in the index for towers that had associated sessions which would
lead to "tower not found" errors on start up.
2023-03-08 11:00:40 +02:00
Elle Mouton
7bf4eee685
chainntnfs: fix temp dir creation and rpcpolling switch
In the NewBitcoindBackend test util function, ensure that the
`rpcpolling` param is switched on in the correct order. Also switch back
to using `ioutil.TempDir` as it seems that the zmq conn strings created
from `t.TempDir()` result in an invalid conn string.
2023-03-07 08:45:58 +02:00
Daniel McNally
9cc9e40b89
lnrpc: update docs for invoice amt_paid
This corrects the documentation for the `amt_paid` and `amt_paid_msat`
fields on the `Invoice` message to indicate that the fields will be set
if the state of the invoice is either accepted or settled, not only
settled. This reflects the actual behavior of lnd, as demonstrated in
the below `lncli` output:

```
"amt_paid": "10000",
"amt_paid_sat": "10",
"amt_paid_msat": "10000",
"state": "ACCEPTED",
```
2023-03-06 20:23:25 -05:00
Olaoluwa Osuntokun
d26cfd241a
Merge pull request #7485 from Roasbeef/v0-16-0-branch-rc2
build: bump version to v0.16.0-rc2
2023-03-06 12:21:58 -08:00
Olaoluwa Osuntokun
8f4fc29fc1
build: bump version to v0.16.0-rc2 2023-03-06 11:24:37 -08:00
Olaoluwa Osuntokun
4b88020269
Merge pull request #7446 from yyforyongyu/fix-future-msg
discovery: flatten future msg cache and increase its size
2023-03-06 11:21:48 -08:00
Oliver Gugger
54a1661c45
Merge pull request #7451 from CRex15/walletkit+labeltransaction
Add note to LabelTransaction [skip ci]
2023-03-06 18:54:23 +01:00
Elle Mouton
641ae28989
chainntnfs: fix sub test names
Some subtest names were incorrectly labeled by if the txindex was
enabled or not but are meant to be labeled by if rpc polling is enabled
or not.
2023-03-06 13:13:51 +02:00
Elle Mouton
de961af5c6
lntest/wait: handle the case where the pred func hangs
This commit fixes a bug in the wait.NoError function. If the predicate
function, f, passed to the NoError function would hang for the full
timeout, then the `predErr` would remain nil and so a nil error would be
returned from the function. This commit handles that case.
2023-03-06 13:10:43 +02:00
Oliver Gugger
5330b3e414
Merge pull request #7475 from lightningnetwork/dependabot/go_modules/tor/golang.org/x/net-0.7.0
build(deps): bump golang.org/x/net from 0.0.0-20211015210444-4f30a5c0130f to 0.7.0 in /tor
2023-03-03 13:41:19 +01:00
Oliver Gugger
2e9ceb2ceb
Merge pull request #7471 from hieblmi/peer-alias-remove-error
rpc: assign peer alias lookup error string
2023-03-03 11:48:13 +01:00
dependabot[bot]
534535f8db
build(deps): bump golang.org/x/net in /tor
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.0.0-20211015210444-4f30a5c0130f to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](https://github.com/golang/net/commits/v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-03-03 09:15:58 +00:00
Oliver Gugger
c4e0927960
Merge pull request #7453 from lightningnetwork/dependabot/go_modules/healthcheck/golang.org/x/sys-0.1.0
build(deps): bump golang.org/x/sys from 0.0.0-20211216021012-1d35b9e2eb4e to 0.1.0 in /healthcheck
2023-03-03 10:15:29 +01:00
Oliver Gugger
880dfd74d8
Merge pull request #7455 from lightningnetwork/dependabot/go_modules/tor/golang.org/x/sys-0.1.0
build(deps): bump golang.org/x/sys from 0.0.0-20211216021012-1d35b9e2eb4e to 0.1.0 in /tor
2023-03-03 10:15:06 +01:00
Slyghtning
910e3832dc docs: update release notes 2023-03-03 10:07:46 +01:00
Slyghtning
213bdb2e01 rpcserver: assign peer alias lookup error 2023-03-03 10:07:44 +01:00