Commit Graph

909 Commits

Author SHA1 Message Date
yyforyongyu
d1ac08b336
itest+lntemp: refactor testListChannels 2022-11-17 20:29:50 +08:00
yyforyongyu
5336c8e5f5
multi: refactor testSphinxReplayPersistence 2022-11-17 20:29:50 +08:00
yyforyongyu
f5ebaa5f35
multi: refactor testDisconnectingTargetPeer 2022-11-17 20:29:50 +08:00
yyforyongyu
d39303f246
itest: wrap assertTxLabel inside wait 2022-11-17 20:29:50 +08:00
yyforyongyu
bbe69f1bd3
multi: refactor testSweepAllCoins 2022-11-17 20:29:50 +08:00
alpeb-btc
0cae501009
lnrpc: provide hop hints when adding an invoice with no amount
With this change we allow adding hop hints when adding an invoice, even
if its amount is zero.

A couple of new unit test case have been added, and the
`testInvoiceRoutingHints` itest was expanded to account for this
scenario.
2022-11-12 05:01:10 -05:00
alpeb-btc
a96483c7d2
itest: refactor testInvoiceRoutingHints' hints check logic
Move code into new closure `checkInvoiceHints` to reuse when checking
other invoices.
2022-11-12 05:01:09 -05:00
Oliver Gugger
b3f6fe315e
itest: add test coverage for Taproot tweak key mutation 2022-11-11 10:20:09 +01:00
Oliver Gugger
e3536dd770
mod+keychain+lntest: bump btcd to version with tweak fix
This commit bumps to the latest version of btcd that fixes a key
mutation issue when signing for Taproot outputs.
2022-11-11 10:20:08 +01:00
yyforyongyu
b7816489a1
itest: add temp fix to bring back btcd build 2022-11-10 13:59:17 +08:00
Joost Jager
511fb00777
htlcswitch: add final htlc event to notifier 2022-10-27 16:42:36 +02:00
Joost Jager
b85cda2a1d
routerrpc: add htlc notifier subscribed event 2022-10-27 16:42:35 +02:00
Slyghtning
8e53996c52 itest: test ForwardingHistory peer lookup opt-in behavior 2022-10-27 07:11:20 -04:00
yyforyongyu
14f45d0722
lntemp+lntest: fix make lint 2022-10-27 01:11:35 +08:00
yyforyongyu
42eab93ba0
lntemp+lntest: use t.Cleanup to register cleanup functions 2022-10-27 01:11:34 +08:00
yyforyongyu
ab62109865
lntemp+lntest: always wait for nodes sync after mining blocks
In this commit, we introduce two mining methods, `MineBlocks` and
`MineBlocksAndAssertNumTxes`, to `HarnessTest`. These methods are
different from the miner's methods as they would 1) mine the blocks
slowly and 2) assert all active nodes have synced. The miner's methods
are kept for future tests such as mining blocks really fast and see the
behavior of `lnd`.
2022-10-27 01:11:34 +08:00
yyforyongyu
f202d27324
itest: break testChannelBackupRestore into smaller tests
This commit breaks the large `testChannelBackupRestore` into smaller
tests to take advantage of our parallel testing framework. A smaller
test also makes the debugging easier, hence better code health.
2022-10-27 01:11:34 +08:00
yyforyongyu
78de9dae05
itest: break testMultiHopHtlcClaims into smaller test cases
This commit breaks the large `testMultiHopHtlcClaims` into independent
test cases to take the advantage of parallel testing. The old setup will
put the stress of creating and syncing new blocks into a single core,
which causes a much longer test time and sometimes times out.
2022-10-27 01:11:34 +08:00
yyforyongyu
3f14ee5870
itest: fix testMultiHopHtlcRemoteChainClaim and linters
This commit makes sure the test `testMultiHopHtlcRemoteChainClaim` takes
account of the one block mined while closing the channel.
2022-10-27 01:11:34 +08:00
yyforyongyu
47279fb9af
itest: fix testMultiHopHtlcLocalChainClaim 2022-10-27 01:11:34 +08:00
yyforyongyu
4668193cfa
itest: fix testMultiHopLocalForceCloseOnChainHtlcTimeout 2022-10-27 01:11:34 +08:00
yyforyongyu
b6cc13417c
itest: move multi hop claim tests into one file 2022-10-27 01:11:33 +08:00
yyforyongyu
c3bc4d403c
itest: reduce blocks mined to save sync time 2022-10-27 01:11:33 +08:00
yyforyongyu
b463147595
itest: refactor testMultiHopHtlcAggregation 2022-10-27 01:11:33 +08:00
yyforyongyu
0115ec8719
itest: refactor testMultiHopHtlcRemoteChainClaim 2022-10-27 01:11:33 +08:00
yyforyongyu
200796b8e2
itest: refactor testMultiHopHtlcLocalChainClaim 2022-10-27 01:11:33 +08:00
yyforyongyu
f65002255c
itest: refactor testMultiHopRemoteForceCloseOnChainHtlcTimeout 2022-10-27 01:11:32 +08:00
yyforyongyu
6b5f4f407c
itest: refactor testMultiHopLocalForceCloseOnChainHtlcTimeout 2022-10-27 01:11:32 +08:00
yyforyongyu
d51f98efc6
itest: refactor testMultiHopReceiverChainClaim 2022-10-27 01:11:32 +08:00
yyforyongyu
5a7c6cea02
lntest+lntemp: refactor testMultiHopHtlcLocalTimeout 2022-10-27 01:11:32 +08:00
yyforyongyu
4a7f45b5d4
itest+lntemp: refactor testMultiHopHtlcClaims 2022-10-27 01:11:32 +08:00
yyforyongyu
e629a3b45a
itest: deprecate createThreeHopNetwork 2022-10-27 01:11:32 +08:00
yyforyongyu
36c84bbd43
itest: refactor testDataLossProtection 2022-10-27 01:11:32 +08:00
yyforyongyu
1fafabe012
itest: move testDataLossProtection to backup test file 2022-10-27 01:11:31 +08:00
yyforyongyu
8cd5a9b6b1
itest: refactor testChannelBackupRestore 2022-10-27 01:11:31 +08:00
yyforyongyu
2966773018
lntemp: add more assertions and supporting methods 2022-10-27 01:11:31 +08:00
yyforyongyu
1b741cb6cc
itest: refactor testExternalFundingChanPoint 2022-10-27 01:11:30 +08:00
yyforyongyu
773cc8e295
itest: refactor testBasicChannelFunding
The test `testExternalFundingChanPoint` is commented out and will be put
back in the following commit.
2022-10-27 01:11:30 +08:00
yyforyongyu
85210b947f
itest: deprecate deriveFundingShim 2022-10-27 01:11:30 +08:00
Slyghtning
85f0ec2954 itest: check peer alias in ForwardingHistory 2022-10-20 09:23:50 -04:00
yyforyongyu
353b744039
lntemp+itest: create interface WebFeeService
This commit adds a new interface, `WebFeeService`, so external projects
can create their own mocked fee services.
2022-10-14 15:45:25 +08:00
yyforyongyu
9d79e76876
itest: timeout while waiting for predicate result
This commit sends the returned value of pred() inside a goroutine such
that when a predicate function never returns during the first run, the
wait package can timeout properly.
2022-10-14 15:45:24 +08:00
yyforyongyu
2ab842c645
itest: refactor test testUpdateChanStatus 2022-10-14 15:45:24 +08:00
yyforyongyu
1350f76627
itest: add a new test entry point to run the temp tests
This commit adds a new function, `TestLightningNetworkDaemonTemp`, to
run the new tests.
2022-10-14 15:45:24 +08:00
yyforyongyu
cd5ab844e2
lntest: export flag logoutput
This commit temporarily exports the flag `logoutput` so it can be used
by `lntemp`.
2022-10-14 07:25:29 +08:00
yyforyongyu
55f8a621ae
lntest+github: add flag temptest to run tests separately
This commit adds a new flag `temptest` so we can run new and old tests
separately. This flag will be removed once the migration from old tests
to new tests is finished.
2022-10-14 07:25:28 +08:00
Olaoluwa Osuntokun
2482de9cab
lnwallet/chancloser: properly compute initial fee of cop close txn
In this commit, we modify the way we compute the starting ideal fee for
the co-op close transaction. Before thsi commit, channel.CalcFee was
used, which'll compute the fee based on the commitment transaction
itself, rathern than the co-op close transaction. As the co-op close
transaction is potentailly bigger (two P2TR outputs) than the commitment
transaction, this can cause us to under estimate the fee, which can
result in the fee rate being too low to propagate.

To remedy this, we now compute a fee estimate from scratch, based on the
delivery fees of the two parties.

We also add a bug fix in the chancloser unit tests that wasn't caught
due to loop variable shadowing.

The wallet import itest has been updated as well, since we'll now pay
600 extra saothis to close the channel, since we're accounting for the
added weight of the P2TR outputs.

Fixes #6953
2022-10-10 14:50:45 -07:00
Slyghtning
41822a8baf itest: openchannel fee scenarios 2022-09-29 08:31:47 -04:00
Olaoluwa Osuntokun
d062a5263e
build: update to latest version of btcwallet w/ taproot estimation fix
Fixes https://github.com/lightningnetwork/lnd/issues/6873
2022-09-27 11:24:39 -07:00
Jesse de Wit
4bc3007668
lntest: add trackpayments itest
Add an itest for the new TrackPayments api.
2022-09-08 10:48:34 +02:00