Commit Graph
64 Commits
Author SHA1 Message Date
yyforyongyu 785e058b77 itest: fix flake in testPaymentFailureReasonCanceled
Fix the case,
```
--- FAIL: TestLightningNetworkDaemon/tranche01/46-of-191/bitcoind/payment_failure_reason_canceled (20.86s)
        harness.go:2113:
            	Error Trace:	/home/runner/work/lnd/lnd/lntest/harness.go:2113
            	            				/home/runner/work/lnd/lnd/itest/lnd_payment_test.go:1183
            	            				/home/runner/work/lnd/lnd/itest/lnd_payment_test.go:1138
            	            				/home/runner/work/lnd/lnd/lntest/harness.go:396
            	            				/home/runner/work/lnd/lnd/itest/lnd_test.go:139
            	Error:      	err from HTLC interceptor stream
            	Test:       	TestLightningNetworkDaemon/tranche01/46-of-191/bitcoind/payment_failure_reason_canceled
            	Messages:   	received err from HTLC interceptor stream: rpc error: code = Unknown desc = interceptor already exists
```
2024-10-29 15:32:17 +08:00
yyforyongyu 21535826ba lntest: remove redundant MineBlocks 2024-10-29 15:31:21 +08:00
Yong 6a5a79fb88 Merge pull request #9209 from guggero/lntest-shutdown
lntest: shutdown all nodes at end of test
2024-10-23 02:00:39 +08:00
Yong caff5a00d1 Merge pull request #9138 from ziggie1984/detail_debug_process
Detail LND's debug procedures.
2024-10-22 20:26:11 +08:00
yyforyongyu 7849e63e0f docs: update release doc 2024-10-17 07:45:06 +08:00
yyforyongyu bf8ae68eea lntest: add method AssertTxnsNotInMempool
So we only need to do one `GetRawMempool` lookup when checking the
exclusion of multiple txns.
2024-10-17 07:34:40 +08:00
yyforyongyu e560e00aeb lntest: remove unused return value 2024-10-17 07:34:25 +08:00
yyforyongyu ed3cb26188 itest+lntest: stop using pointer to chainhash.Hash
This commit fixes the methods used in `lntest` so they stop using
pointers to chainhash.
2024-10-17 07:14:51 +08:00
Yong da7f8aeb61 Merge pull request #9099 from lightningnetwork/kvdb-wallet-db
kvdb: update to latest walletdb version
2024-09-15 15:22:15 +08:00
yyforyongyu db332db025 Makefile: add -test.v for make itest 2024-09-10 17:21:03 +08:00
Yong 278cf03078 Merge pull request #9028 from yyforyongyu/improve-ci-log
Makefile: silence testing log in `make itest-parallel`
2024-08-23 17:55:04 +08:00
yyforyongyu 35287ee899 scripts: silence test outputs 2024-08-23 15:48:09 +08:00
Yong 77c7f776d5 Merge pull request #9002 from Roasbeef/tlv-edge-info-bug-fix
discovery: fix bug that can lead to sending invalid chan_ann msgs
2024-08-14 23:29:36 +08:00
yyforyongyu 363e529f9b docs: update release notes 2024-08-09 22:01:57 +08:00
yyforyongyu 8259e0fb5f itest: remove redundant call to ht.WaitForBlockchainSync
This check has already been done when mining blocks.
2024-08-09 22:01:57 +08:00
yyforyongyu 3e36adf476 mulit: remove ListLeasedOutputs in LeaseOutput
This commit removes the call toe `ListLeasedOutputs` in `LeaseOutput` -
the returned info from `ListLeasedOutputs` can easily be accessed via
`FetchInputInfo` and this info is only used at one callsite.
`ListLeasedOutputs` then becomes unnecessary here, plus it's very slow
and needs to be refactored in `btcwallet` instead.
2024-08-09 22:01:57 +08:00
yyforyongyu f70c919164 lnrpc: fetch utxo info in lockInputs
This commit prepares the following commit where we change the
`LeaseOutput` to be more efficient.
2024-08-09 22:01:57 +08:00
yyforyongyu b17db4a32a lntest+lnwallet: remove the method FetchInputInfo
This method is no longer used. In addition, the `Derivation` field on
the `Utxo` is also removed to avoid nil dereference.
2024-08-09 22:01:56 +08:00
yyforyongyu d7381ce3fe rpcserver: remove redundant call to FetchInputInfo 2024-08-09 22:01:56 +08:00
yyforyongyu aba8507b2a lnrpc+lnwallet: replace FetchInputInfo with new methods
This commit replaces the usage of `FetchInputInfo` with
`FetchOutpointInfo` and `FetchDerivationInfo` to remove unncessary
fetching of the derivation path.
2024-08-09 21:51:18 +08:00
yyforyongyu 9801ee036b lnwallet+lntest: add FetchOutpointInfo and FetchDerivationInfo 2024-08-09 21:51:17 +08:00
yyforyongyu 8f35612364 mod: update btcwallet version 2024-08-09 21:51:15 +08:00
Yong a449a5d132 Merge pull request #8174 from yyforyongyu/fix-inflight-payments
routing: fix stuck inflight payments
2024-08-07 23:23:27 +08:00
yyforyongyu bc31a8b36f routing: fix doc string 2024-08-07 22:19:23 +08:00
yyforyongyu 677f2c390a lntest: re-define CleanupForceClose
To reflect the new sweeping behavior, also makes it easier to be used as
we need to method to quickly cleanup force closes without concerning the
details when we are not testing the force close behavior.
2024-08-07 22:19:23 +08:00
yyforyongyu 7aba5cbc0a routing: fix linter complains 2024-08-07 22:19:23 +08:00
yyforyongyu dcd8269050 docs: update release notes 2024-08-07 20:42:58 +08:00
yyforyongyu e542351149 itest: add testSendSelectedCoins to check selected utxos 2024-08-07 20:42:58 +08:00
yyforyongyu 0041426e7e itest+lntest: return the error from SendCoinsAssertErr
Also rename the send all coins test for clarity.
2024-08-07 20:42:28 +08:00
Yong ab96de3f07 Merge pull request #8967 from ProofOfKeags/feature/stfu-wire
[MICRO]: add wire messages for quiescence
2024-08-06 13:52:12 +08:00
yyforyongyu d992cf94d6 multi: add SpewLogClosure to avoid code repetition 2024-07-25 22:18:49 +08:00
yyforyongyu b6049ff94b multi: add NewLogClosure in lnutils to avoid repetition
And replaces all usage of `logClosure` with `lnutils.LogClosure`.
2024-07-25 21:25:23 +08:00
yyforyongyu 7e60d41898 chainfee: make sure web API has been started before estimating
Previously we may get a floor feerate when calling `EstimateFeePerKW`
due to the fee estimator not finishing its startup process, which gives
us an empty fee map.

This is now fixed to return an error if the estimator is not started.
2024-07-24 20:05:00 +08:00
yyforyongyu 0a0d51ce22 docs: update release notes 2024-07-24 20:05:00 +08:00
yyforyongyu a1d71afde8 lntest: allow specifying min relay feerate in itest 2024-07-24 20:05:00 +08:00
yyforyongyu ce43e4bab7 chainfee: allow specifying min relay feerate from API source
This commit adds a new expected field, `min_relay_feerate`, in the
response body returned from the API source, allowing the API to specify
a min relay feerate to be used instead of the FeePerKwFloor.

This change is backwards compatible as for an old API source which
doesn't specify the `min_relay_feerate`, it will be interpreted as zero.
2024-07-24 20:05:00 +08:00
yyforyongyu 48a0efe40c bitcoindnotify: add debug logs in unit test 2024-07-24 18:05:06 +08:00
yyforyongyu 9fee656d70 chainntnfs+lntest: fix TestInterfaces
This commit upgrades the test to always use a segwit v0 witness program
when creating testing txns.
2024-07-24 17:43:27 +08:00
yyforyongyu 91807625bb itest: fix testUnconfirmedChannelFunding for neutrino
This test was previously working because we'd mine an extra block to
confirm the coins inside `FundCoinsUnconfirmed` when it's a neutrino
backend, as shown in
https://github.com/lightningnetwork/lnd/blob/fdd28c8d888792ea8fde3c557ba9f2594e0a6ec8/lntest/harness.go#L1431
Since neutrino has trouble seeing unconfirmed balance, we now send some
coins to the wallet, confirm those, then do a self-transfer so the node
will have unconfirmed outputs to perform the test.
2024-07-23 21:53:51 +08:00
yyforyongyu 2d21aa3718 docs: update release notes 2024-07-23 21:30:09 +08:00
yyforyongyu 4dcce9df69 lntest+itest: fix flakes found using neutrino backend
This commit makes sure the sweep requests are received before mining
blocks to trigger the actual sweeping.

In addition, `testFundingExpiryBlocksOnPending` is updated to deal with
the old `channel link not found` issue.
2024-07-23 21:30:09 +08:00
yyforyongyu 2608c0893e multi: make sure missionControlStore catches done signal
This commit makes sure `missionControlStore` catches the shutdown signal
when draining the ticker. A few debug logs are added to aid the process.
2024-07-23 21:30:08 +08:00
yyforyongyu 50279464ad itest: remove unused param in chanRestoreViaRPC 2024-07-23 21:30:08 +08:00
yyforyongyu 623f816f8e lntest: remove redundant nodes shutdown
The nodes are already shut down in the `Cleanup` in `ht.Subtest` so
there's no need to shutdown them again.
2024-07-23 21:30:08 +08:00
Yong 3526f82b5d Merge pull request #8887 from yyforyongyu/fix-err-match
multi: fix `lnwallet.ErrDoubleSpend`
2024-07-08 14:09:07 +08:00
yyforyongyu e27a656c07 docs: add release notes for 0.18.3 2024-07-06 14:01:40 +08:00
yyforyongyu 26a365eb32 docs: update release notes 2024-07-06 13:59:28 +08:00
yyforyongyu 8f4bcd0b3a lnwallet: fix ErrDoubleSpend 2024-07-06 13:59:28 +08:00
yyforyongyu ddf46f435c multi: update RPC error import path
These errors are now defined in `btcwallet/chain` instead of
`btcd/rpcclient`.
2024-07-06 13:59:28 +08:00
yyforyongyu e0a506ab26 multi: use chain.MapRPCErr instead of rpcclient.MapRPCErr 2024-07-06 13:59:25 +08:00
yyforyongyu 1d40c55550 gomod: update btcwallet to include RPC errors 2024-07-06 13:55:12 +08:00
yyforyongyu 7fd099b146 docs: update release notes and add notes for 0.18.2 2024-06-26 01:44:00 +08:00
yyforyongyu 3b4106ca00 mod: update btcd and btcwallet versions 2024-06-26 00:41:17 +08:00
Yong e6f7a2d6a7 Merge pull request #8734 from hieblmi/cancel-estimateroutefee
routing: cancelable payment loop
2024-06-17 18:06:52 +08:00
yyforyongyu 955670fcc2 itest: provide a temporary fix to unblock CI 2024-06-14 15:18:20 +08:00
yyforyongyu 0f7c641f92 cli: update pendingsweeps response 2024-06-13 19:17:16 +08:00
Yong cf88a8ae04 Merge pull request #8828 from yyforyongyu/increase-itest-timeout
lntest: increase timeout for postgres backend
2024-06-13 19:00:49 +08:00
yyforyongyu 84e58d6f02 workflows: decrease TRANCHES to 8 2024-06-13 17:54:34 +08:00
yyforyongyu 6de1b026dd chainntnfs: add verbose logging in unit test 2024-06-13 17:54:34 +08:00
yyforyongyu 9f34a4dc54 itest: skip error assertion when parent context finishes
We may get a flake like the following,
```
lnd_route_blinding_test.go:468:
            Error Trace:    /Users/runner/work/lnd/lnd/itest/lnd_route_blinding_test.go:468
                                        /Users/runner/hostedtoolcache/go/1.22.3/arm64/src/runtime/asm_arm64.s:1222
            Error:          Received unexpected error:
                            rpc error: code = Canceled desc = context canceled
            Test:           TestLightningNetworkDaemon/tranche15/144-of-156/bitcoind/disable_introduction_node
```

This happens when the test successfully finishes, the parent context is
canceled, causing the child context to return an error. We fix it by
ignoring it in the goroutine.
2024-06-13 17:54:30 +08:00
yyforyongyu ddceb2b15b lntest: increase timeout for postgres backend
Also decrease timeout values for other builds.
2024-06-13 17:54:30 +08:00
Yong 286ee95735 Merge pull request #8800 from ProofOfKeags/bugfix/8535
contractcourt: consider delivery addresses when evaluating toSelfAmount
2024-06-12 01:06:36 +08:00
yyforyongyu e61cba8d22 multi: return verbose errors when fetching edges 2024-06-10 08:40:18 +08:00
yyforyongyu 78cc1619d7 multi: fix complaints from IDE and linter
Fixed unused param and nilness cond.
2024-06-07 00:45:15 +08:00