2022-08-12 15:16:35 +08:00
|
|
|
//go:build integration
|
2022-07-22 08:55:38 +08:00
|
|
|
|
|
|
|
package itest
|
|
|
|
|
2024-10-25 03:33:37 +08:00
|
|
|
import (
|
2024-12-04 06:29:22 +08:00
|
|
|
"fmt"
|
|
|
|
|
2024-10-25 03:33:37 +08:00
|
|
|
"github.com/lightningnetwork/lnd/lntest"
|
|
|
|
)
|
2022-07-22 08:55:38 +08:00
|
|
|
|
2022-08-12 17:03:44 +08:00
|
|
|
var allTestCases = []*lntest.TestCase{
|
2022-07-22 17:34:36 +08:00
|
|
|
{
|
|
|
|
Name: "update channel status",
|
|
|
|
TestFunc: testUpdateChanStatus,
|
|
|
|
},
|
2022-07-26 17:00:27 +08:00
|
|
|
{
|
|
|
|
Name: "external channel funding",
|
|
|
|
TestFunc: testExternalFundingChanPoint,
|
|
|
|
},
|
2022-08-17 16:53:07 +08:00
|
|
|
{
|
|
|
|
Name: "channel backup restore unconfirmed",
|
|
|
|
TestFunc: testChannelBackupRestoreUnconfirmed,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "channel backup restore force close",
|
|
|
|
TestFunc: testChannelBackupRestoreForceClose,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "channel backup restore legacy",
|
|
|
|
TestFunc: testChannelBackupRestoreLegacy,
|
2022-07-28 17:44:23 +08:00
|
|
|
},
|
2022-07-28 18:25:06 +08:00
|
|
|
{
|
|
|
|
Name: "data loss protection",
|
|
|
|
TestFunc: testDataLossProtection,
|
|
|
|
},
|
2022-08-02 20:56:13 +08:00
|
|
|
{
|
2024-07-30 01:33:47 +08:00
|
|
|
Name: "send all coins",
|
|
|
|
TestFunc: testSendAllCoins,
|
2022-08-02 20:56:13 +08:00
|
|
|
},
|
2024-07-30 01:34:27 +08:00
|
|
|
{
|
|
|
|
Name: "send selected coins",
|
|
|
|
TestFunc: testSendSelectedCoins,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "send selected coins channel reserve",
|
|
|
|
TestFunc: testSendSelectedCoinsChannelReserve,
|
|
|
|
},
|
2022-08-02 21:15:49 +08:00
|
|
|
{
|
|
|
|
Name: "disconnecting target peer",
|
|
|
|
TestFunc: testDisconnectingTargetPeer,
|
|
|
|
},
|
2022-08-03 00:25:19 +08:00
|
|
|
{
|
|
|
|
Name: "sphinx replay persistence",
|
|
|
|
TestFunc: testSphinxReplayPersistence,
|
|
|
|
},
|
2023-03-07 14:37:13 -08:00
|
|
|
{
|
|
|
|
Name: "funding expiry blocks on pending",
|
|
|
|
TestFunc: testFundingExpiryBlocksOnPending,
|
|
|
|
},
|
2022-08-03 01:00:20 +08:00
|
|
|
{
|
|
|
|
Name: "list channels",
|
|
|
|
TestFunc: testListChannels,
|
|
|
|
},
|
2022-08-03 21:29:25 +08:00
|
|
|
{
|
|
|
|
Name: "max pending channel",
|
|
|
|
TestFunc: testMaxPendingChannels,
|
|
|
|
},
|
2022-08-04 00:34:01 +08:00
|
|
|
{
|
|
|
|
Name: "garbage collect link nodes",
|
|
|
|
TestFunc: testGarbageCollectLinkNodes,
|
|
|
|
},
|
2022-08-04 00:37:47 +08:00
|
|
|
{
|
|
|
|
Name: "reject onward htlc",
|
|
|
|
TestFunc: testRejectHTLC,
|
|
|
|
},
|
2022-08-04 00:40:47 +08:00
|
|
|
{
|
|
|
|
Name: "node sign verify",
|
|
|
|
TestFunc: testNodeSignVerify,
|
|
|
|
},
|
2022-08-18 17:30:34 +08:00
|
|
|
{
|
|
|
|
Name: "list addresses",
|
|
|
|
TestFunc: testListAddresses,
|
|
|
|
},
|
2022-08-04 00:49:39 +08:00
|
|
|
{
|
|
|
|
Name: "abandonchannel",
|
|
|
|
TestFunc: testAbandonChannel,
|
|
|
|
},
|
2022-08-04 01:00:09 +08:00
|
|
|
{
|
|
|
|
Name: "recovery info",
|
|
|
|
TestFunc: testGetRecoveryInfo,
|
|
|
|
},
|
2022-08-04 01:08:52 +08:00
|
|
|
{
|
|
|
|
Name: "onchain fund recovery",
|
|
|
|
TestFunc: testOnchainFundRecovery,
|
|
|
|
},
|
2022-12-08 11:48:51 +01:00
|
|
|
{
|
|
|
|
Name: "wallet rescan address detection",
|
|
|
|
TestFunc: testRescanAddressDetection,
|
|
|
|
},
|
2022-08-04 01:22:05 +08:00
|
|
|
{
|
|
|
|
Name: "basic funding flow with all input types",
|
|
|
|
TestFunc: testChannelFundingInputTypes,
|
|
|
|
},
|
2022-08-04 01:35:18 +08:00
|
|
|
{
|
|
|
|
Name: "unconfirmed channel funding",
|
|
|
|
TestFunc: testUnconfirmedChannelFunding,
|
|
|
|
},
|
2022-08-04 02:36:12 +08:00
|
|
|
{
|
|
|
|
Name: "funding flow persistence",
|
|
|
|
TestFunc: testChannelFundingPersistence,
|
|
|
|
},
|
2022-08-04 02:48:19 +08:00
|
|
|
{
|
|
|
|
Name: "batch channel funding",
|
|
|
|
TestFunc: testBatchChanFunding,
|
|
|
|
},
|
2024-04-02 19:32:50 +01:00
|
|
|
{
|
|
|
|
Name: "open channel with unstable utxos",
|
|
|
|
TestFunc: testChannelFundingWithUnstableUtxos,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "open psbt channel with unstable utxos",
|
|
|
|
TestFunc: testPsbtChanFundingWithUnstableUtxos,
|
|
|
|
},
|
2022-08-04 03:38:09 +08:00
|
|
|
{
|
|
|
|
Name: "update channel policy",
|
|
|
|
TestFunc: testUpdateChannelPolicy,
|
|
|
|
},
|
2022-08-04 05:37:43 +08:00
|
|
|
{
|
|
|
|
Name: "send update disable channel",
|
|
|
|
TestFunc: testSendUpdateDisableChannel,
|
|
|
|
},
|
2022-08-04 06:20:13 +08:00
|
|
|
{
|
|
|
|
Name: "connection timeout",
|
|
|
|
TestFunc: testNetworkConnectionTimeout,
|
|
|
|
},
|
2022-08-04 06:28:31 +08:00
|
|
|
{
|
|
|
|
Name: "reconnect after ip change",
|
|
|
|
TestFunc: testReconnectAfterIPChange,
|
|
|
|
},
|
2022-08-04 06:32:20 +08:00
|
|
|
{
|
|
|
|
Name: "addpeer config",
|
|
|
|
TestFunc: testAddPeerConfig,
|
|
|
|
},
|
2023-04-28 23:36:22 +08:00
|
|
|
{
|
|
|
|
Name: "private channel update policy",
|
|
|
|
TestFunc: testUpdateChannelPolicyForPrivateChannel,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "update channel policy fee rate accuracy",
|
|
|
|
TestFunc: testUpdateChannelPolicyFeeRateAccuracy,
|
|
|
|
},
|
2022-08-04 06:36:36 +08:00
|
|
|
{
|
|
|
|
Name: "unannounced channels",
|
|
|
|
TestFunc: testUnannouncedChannels,
|
|
|
|
},
|
2022-08-04 06:46:45 +08:00
|
|
|
{
|
|
|
|
Name: "graph topology notifications",
|
|
|
|
TestFunc: testGraphTopologyNotifications,
|
|
|
|
},
|
2022-08-04 06:49:43 +08:00
|
|
|
{
|
|
|
|
Name: "node announcement",
|
|
|
|
TestFunc: testNodeAnnouncement,
|
|
|
|
},
|
2022-08-04 06:59:21 +08:00
|
|
|
{
|
|
|
|
Name: "update node announcement rpc",
|
|
|
|
TestFunc: testUpdateNodeAnnouncement,
|
|
|
|
},
|
2022-08-04 07:14:26 +08:00
|
|
|
{
|
2024-01-26 10:23:01 +08:00
|
|
|
Name: "list payments",
|
2022-08-04 07:14:26 +08:00
|
|
|
TestFunc: testListPayments,
|
|
|
|
},
|
2023-09-28 18:30:22 +08:00
|
|
|
{
|
2024-12-05 08:49:56 +08:00
|
|
|
Name: "send direct payment anchor",
|
|
|
|
TestFunc: testSendDirectPaymentAnchor,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "send direct payment simple taproot",
|
|
|
|
TestFunc: testSendDirectPaymentSimpleTaproot,
|
2023-09-28 18:30:22 +08:00
|
|
|
},
|
2022-08-04 08:25:45 +08:00
|
|
|
{
|
|
|
|
Name: "immediate payment after channel opened",
|
|
|
|
TestFunc: testPaymentFollowingChannelOpen,
|
|
|
|
},
|
2024-07-26 17:11:59 +02:00
|
|
|
{
|
|
|
|
Name: "payment failure reason canceled",
|
|
|
|
TestFunc: testPaymentFailureReasonCanceled,
|
|
|
|
},
|
2022-08-04 08:37:28 +08:00
|
|
|
{
|
|
|
|
Name: "invoice update subscription",
|
|
|
|
TestFunc: testInvoiceSubscriptions,
|
|
|
|
},
|
2022-08-04 09:05:48 +08:00
|
|
|
{
|
|
|
|
Name: "streaming channel backup update",
|
|
|
|
TestFunc: testChannelBackupUpdates,
|
|
|
|
},
|
2022-08-04 09:09:35 +08:00
|
|
|
{
|
|
|
|
Name: "export channel backup",
|
|
|
|
TestFunc: testExportChannelBackup,
|
|
|
|
},
|
2022-08-04 19:59:17 +08:00
|
|
|
{
|
|
|
|
Name: "channel balance",
|
|
|
|
TestFunc: testChannelBalance,
|
|
|
|
},
|
2022-08-04 20:02:07 +08:00
|
|
|
{
|
|
|
|
Name: "channel unsettled balance",
|
|
|
|
TestFunc: testChannelUnsettledBalance,
|
|
|
|
},
|
2022-12-02 13:40:19 +00:00
|
|
|
{
|
|
|
|
Name: "chain kit",
|
|
|
|
TestFunc: testChainKit,
|
|
|
|
},
|
2022-08-18 18:16:27 +02:00
|
|
|
{
|
|
|
|
Name: "neutrino kit",
|
|
|
|
TestFunc: testNeutrino,
|
|
|
|
},
|
2022-08-05 03:34:42 +08:00
|
|
|
{
|
|
|
|
Name: "etcd failover",
|
|
|
|
TestFunc: testEtcdFailover,
|
|
|
|
},
|
2024-07-25 18:23:48 +02:00
|
|
|
{
|
|
|
|
Name: "leader health check",
|
|
|
|
TestFunc: testLeaderHealthCheck,
|
|
|
|
},
|
2022-08-05 17:48:35 +08:00
|
|
|
{
|
|
|
|
Name: "hold invoice force close",
|
|
|
|
TestFunc: testHoldInvoiceForceClose,
|
|
|
|
},
|
2022-08-05 17:59:00 +08:00
|
|
|
{
|
|
|
|
Name: "hold invoice sender persistence",
|
|
|
|
TestFunc: testHoldInvoicePersistence,
|
|
|
|
},
|
2022-08-05 18:12:11 +08:00
|
|
|
{
|
|
|
|
Name: "maximum channel size",
|
|
|
|
TestFunc: testMaxChannelSize,
|
|
|
|
},
|
2022-08-05 18:15:48 +08:00
|
|
|
{
|
|
|
|
Name: "wumbo channels",
|
|
|
|
TestFunc: testWumboChannels,
|
|
|
|
},
|
2022-08-05 18:22:19 +08:00
|
|
|
{
|
|
|
|
Name: "max htlc pathfind",
|
|
|
|
TestFunc: testMaxHtlcPathfind,
|
|
|
|
},
|
2022-08-05 18:36:15 +08:00
|
|
|
{
|
|
|
|
Name: "multi-hop htlc error propagation",
|
|
|
|
TestFunc: testHtlcErrorPropagation,
|
|
|
|
},
|
2022-08-05 18:44:52 +08:00
|
|
|
{
|
|
|
|
Name: "multi-hop payments",
|
|
|
|
TestFunc: testMultiHopPayments,
|
|
|
|
},
|
2024-02-09 15:21:51 +01:00
|
|
|
{
|
|
|
|
Name: "estimate route fee",
|
|
|
|
TestFunc: testEstimateRouteFee,
|
|
|
|
},
|
2022-08-07 05:50:49 +08:00
|
|
|
{
|
|
|
|
Name: "anchors reserved value",
|
|
|
|
TestFunc: testAnchorReservedValue,
|
|
|
|
},
|
2022-08-07 06:06:02 +08:00
|
|
|
{
|
|
|
|
Name: "3rd party anchor spend",
|
|
|
|
TestFunc: testAnchorThirdPartySpend,
|
|
|
|
},
|
2022-08-07 07:53:43 +08:00
|
|
|
{
|
|
|
|
Name: "open channel reorg test",
|
|
|
|
TestFunc: testOpenChannelAfterReorg,
|
|
|
|
},
|
2022-08-11 13:07:33 +08:00
|
|
|
{
|
|
|
|
Name: "sign psbt",
|
|
|
|
TestFunc: testSignPsbt,
|
|
|
|
},
|
2024-02-06 12:26:01 +01:00
|
|
|
{
|
|
|
|
Name: "fund psbt",
|
|
|
|
TestFunc: testFundPsbt,
|
|
|
|
},
|
2022-08-08 12:19:48 +08:00
|
|
|
{
|
|
|
|
Name: "resolution handoff",
|
|
|
|
TestFunc: testResHandoff,
|
|
|
|
},
|
2022-08-08 12:30:01 +08:00
|
|
|
{
|
|
|
|
Name: "REST API",
|
|
|
|
TestFunc: testRestAPI,
|
|
|
|
},
|
2022-08-08 12:59:19 +08:00
|
|
|
{
|
|
|
|
Name: "revoked uncooperative close retribution",
|
|
|
|
TestFunc: testRevokedCloseRetribution,
|
|
|
|
},
|
2022-08-08 20:50:03 +08:00
|
|
|
{
|
|
|
|
Name: "revoked uncooperative close retribution zero value " +
|
|
|
|
"remote output",
|
|
|
|
TestFunc: testRevokedCloseRetributionZeroValueRemoteOutput,
|
|
|
|
},
|
2022-08-09 00:49:51 +08:00
|
|
|
{
|
|
|
|
Name: "revoked uncooperative close retribution remote hodl",
|
|
|
|
TestFunc: testRevokedCloseRetributionRemoteHodl,
|
|
|
|
},
|
2022-08-09 01:24:05 +08:00
|
|
|
{
|
|
|
|
Name: "multi-hop send to route",
|
|
|
|
TestFunc: testMultiHopSendToRoute,
|
|
|
|
},
|
2022-08-09 01:27:10 +08:00
|
|
|
{
|
|
|
|
Name: "send to route error propagation",
|
|
|
|
TestFunc: testSendToRouteErrorPropagation,
|
|
|
|
},
|
2022-08-09 01:30:45 +08:00
|
|
|
{
|
|
|
|
Name: "private channels",
|
|
|
|
TestFunc: testPrivateChannels,
|
|
|
|
},
|
2022-08-09 01:36:00 +08:00
|
|
|
{
|
|
|
|
Name: "invoice routing hints",
|
|
|
|
TestFunc: testInvoiceRoutingHints,
|
|
|
|
},
|
2024-03-08 13:21:22 +01:00
|
|
|
{
|
|
|
|
Name: "scid alias routing hints",
|
|
|
|
TestFunc: testScidAliasRoutingHints,
|
|
|
|
},
|
2022-08-09 01:39:19 +08:00
|
|
|
{
|
|
|
|
Name: "multi-hop payments over private channels",
|
|
|
|
TestFunc: testMultiHopOverPrivateChannels,
|
|
|
|
},
|
2022-08-09 01:47:50 +08:00
|
|
|
{
|
|
|
|
Name: "query routes",
|
|
|
|
TestFunc: testQueryRoutes,
|
|
|
|
},
|
2022-08-09 02:00:03 +08:00
|
|
|
{
|
|
|
|
Name: "route fee cutoff",
|
|
|
|
TestFunc: testRouteFeeCutoff,
|
|
|
|
},
|
2024-07-26 09:20:37 +02:00
|
|
|
{
|
|
|
|
Name: "route fee limit after queryroutes",
|
|
|
|
TestFunc: testFeeLimitAfterQueryRoutes,
|
|
|
|
},
|
2023-01-16 07:49:16 +08:00
|
|
|
{
|
|
|
|
Name: "rpc middleware interceptor",
|
|
|
|
TestFunc: testRPCMiddlewareInterceptor,
|
|
|
|
},
|
2022-08-09 14:30:44 +08:00
|
|
|
{
|
|
|
|
Name: "macaroon authentication",
|
|
|
|
TestFunc: testMacaroonAuthentication,
|
|
|
|
},
|
2022-08-09 14:33:15 +08:00
|
|
|
{
|
|
|
|
Name: "bake macaroon",
|
|
|
|
TestFunc: testBakeMacaroon,
|
|
|
|
},
|
2022-08-09 14:35:45 +08:00
|
|
|
{
|
|
|
|
Name: "delete macaroon id",
|
|
|
|
TestFunc: testDeleteMacaroonID,
|
|
|
|
},
|
2022-08-09 15:18:39 +08:00
|
|
|
{
|
|
|
|
Name: "stateless init",
|
|
|
|
TestFunc: testStatelessInit,
|
|
|
|
},
|
2022-08-09 15:27:54 +08:00
|
|
|
{
|
|
|
|
Name: "single hop invoice",
|
|
|
|
TestFunc: testSingleHopInvoice,
|
|
|
|
},
|
2022-08-09 15:36:07 +08:00
|
|
|
{
|
|
|
|
Name: "wipe forwarding packages",
|
|
|
|
TestFunc: testWipeForwardingPackages,
|
|
|
|
},
|
2022-08-09 18:57:39 +08:00
|
|
|
{
|
|
|
|
Name: "switch circuit persistence",
|
|
|
|
TestFunc: testSwitchCircuitPersistence,
|
|
|
|
},
|
2022-08-09 19:04:36 +08:00
|
|
|
{
|
|
|
|
Name: "switch offline delivery",
|
|
|
|
TestFunc: testSwitchOfflineDelivery,
|
|
|
|
},
|
2022-08-09 19:09:59 +08:00
|
|
|
{
|
|
|
|
Name: "switch offline delivery persistence",
|
|
|
|
TestFunc: testSwitchOfflineDeliveryPersistence,
|
|
|
|
},
|
2022-08-09 19:15:20 +08:00
|
|
|
{
|
|
|
|
Name: "switch offline delivery outgoing offline",
|
|
|
|
TestFunc: testSwitchOfflineDeliveryOutgoingOffline,
|
|
|
|
},
|
2022-08-10 03:18:54 +08:00
|
|
|
{
|
|
|
|
Name: "sendtoroute multi path payment",
|
|
|
|
TestFunc: testSendToRouteMultiPath,
|
|
|
|
},
|
2022-08-10 11:34:59 +08:00
|
|
|
{
|
|
|
|
Name: "send multi path payment",
|
|
|
|
TestFunc: testSendMultiPathPayment,
|
|
|
|
},
|
2022-08-11 04:10:40 +08:00
|
|
|
{
|
|
|
|
Name: "sendpayment amp invoice",
|
|
|
|
TestFunc: testSendPaymentAMPInvoice,
|
|
|
|
},
|
2022-08-11 03:02:44 +08:00
|
|
|
{
|
|
|
|
Name: "sendpayment amp invoice repeat",
|
|
|
|
TestFunc: testSendPaymentAMPInvoiceRepeat,
|
|
|
|
},
|
2022-08-11 04:38:11 +08:00
|
|
|
{
|
|
|
|
Name: "send payment amp",
|
|
|
|
TestFunc: testSendPaymentAMP,
|
|
|
|
},
|
2022-08-11 05:06:35 +08:00
|
|
|
{
|
|
|
|
Name: "sendtoroute amp",
|
|
|
|
TestFunc: testSendToRouteAMP,
|
|
|
|
},
|
2022-08-11 05:35:22 +08:00
|
|
|
{
|
|
|
|
Name: "forward interceptor dedup htlcs",
|
|
|
|
TestFunc: testForwardInterceptorDedupHtlc,
|
|
|
|
},
|
2022-08-11 05:59:10 +08:00
|
|
|
{
|
|
|
|
Name: "forward interceptor",
|
|
|
|
TestFunc: testForwardInterceptorBasic,
|
|
|
|
},
|
2024-04-16 12:29:39 +02:00
|
|
|
{
|
|
|
|
Name: "forward interceptor restart",
|
|
|
|
TestFunc: testForwardInterceptorRestart,
|
|
|
|
},
|
2024-04-30 17:51:50 +01:00
|
|
|
{
|
|
|
|
Name: "invoice HTLC modifier basic",
|
|
|
|
TestFunc: testInvoiceHtlcModifierBasic,
|
|
|
|
},
|
2022-08-11 07:06:23 +08:00
|
|
|
{
|
|
|
|
Name: "zero conf channel open",
|
|
|
|
TestFunc: testZeroConfChannelOpen,
|
|
|
|
},
|
2022-08-11 07:15:33 +08:00
|
|
|
{
|
|
|
|
Name: "option scid alias",
|
|
|
|
TestFunc: testOptionScidAlias,
|
|
|
|
},
|
2022-08-11 10:59:09 +08:00
|
|
|
{
|
|
|
|
Name: "scid alias upgrade",
|
|
|
|
TestFunc: testOptionScidUpgrade,
|
|
|
|
},
|
2022-08-11 11:13:47 +08:00
|
|
|
{
|
|
|
|
Name: "nonstd sweep",
|
|
|
|
TestFunc: testNonstdSweep,
|
|
|
|
},
|
2022-08-11 11:39:16 +08:00
|
|
|
{
|
|
|
|
Name: "multiple channel creation and update subscription",
|
|
|
|
TestFunc: testBasicChannelCreationAndUpdates,
|
|
|
|
},
|
2022-08-11 11:44:29 +08:00
|
|
|
{
|
|
|
|
Name: "derive shared key",
|
|
|
|
TestFunc: testDeriveSharedKey,
|
|
|
|
},
|
2022-08-11 11:59:14 +08:00
|
|
|
{
|
|
|
|
Name: "sign output raw",
|
|
|
|
TestFunc: testSignOutputRaw,
|
|
|
|
},
|
2022-08-11 12:23:33 +08:00
|
|
|
{
|
|
|
|
Name: "sign verify message",
|
|
|
|
TestFunc: testSignVerifyMessage,
|
|
|
|
},
|
2022-08-11 12:37:39 +08:00
|
|
|
{
|
2024-04-11 16:58:24 +08:00
|
|
|
Name: "bumpfee",
|
|
|
|
TestFunc: testBumpFee,
|
2022-08-11 12:37:39 +08:00
|
|
|
},
|
2024-07-29 16:42:55 +02:00
|
|
|
{
|
|
|
|
Name: "bumpforceclosefee",
|
|
|
|
TestFunc: testBumpForceCloseFee,
|
|
|
|
},
|
2022-08-25 20:50:55 +08:00
|
|
|
{
|
2024-11-09 15:18:40 +08:00
|
|
|
Name: "taproot spend",
|
|
|
|
TestFunc: testTaprootSpend,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "taproot musig2",
|
|
|
|
TestFunc: testTaprootMuSig2,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "taproot import scripts",
|
|
|
|
TestFunc: testTaprootImportScripts,
|
2022-08-25 20:50:55 +08:00
|
|
|
},
|
2023-10-10 19:54:26 +02:00
|
|
|
{
|
|
|
|
Name: "simple taproot channel activation",
|
|
|
|
TestFunc: testSimpleTaprootChannelActivation,
|
|
|
|
},
|
2022-08-11 14:01:08 +08:00
|
|
|
{
|
|
|
|
Name: "wallet import pubkey",
|
|
|
|
TestFunc: testWalletImportPubKey,
|
|
|
|
},
|
2022-08-11 15:42:36 +08:00
|
|
|
{
|
|
|
|
Name: "async payments benchmark",
|
|
|
|
TestFunc: testAsyncPayments,
|
|
|
|
},
|
2022-08-12 18:19:51 +08:00
|
|
|
{
|
|
|
|
Name: "taproot coop close",
|
|
|
|
TestFunc: testTaprootCoopClose,
|
|
|
|
},
|
2022-09-20 16:01:49 +08:00
|
|
|
{
|
|
|
|
Name: "trackpayments",
|
|
|
|
TestFunc: testTrackPayments,
|
|
|
|
},
|
2023-11-15 19:58:52 +08:00
|
|
|
{
|
|
|
|
Name: "trackpayments compatible",
|
|
|
|
TestFunc: testTrackPaymentsCompatible,
|
|
|
|
},
|
2023-01-11 18:39:18 +08:00
|
|
|
{
|
|
|
|
Name: "custom message",
|
|
|
|
TestFunc: testCustomMessage,
|
|
|
|
},
|
2022-12-03 16:35:04 +01:00
|
|
|
{
|
|
|
|
Name: "sign verify message with addr",
|
|
|
|
TestFunc: testSignVerifyMessageWithAddr,
|
|
|
|
},
|
2023-01-05 17:40:35 -05:00
|
|
|
{
|
|
|
|
Name: "zero conf reorg edge existence",
|
|
|
|
TestFunc: testZeroConfReorg,
|
|
|
|
},
|
2022-08-11 19:08:25 +08:00
|
|
|
{
|
|
|
|
Name: "async bidirectional payments",
|
|
|
|
TestFunc: testBidirectionalAsyncPayments,
|
|
|
|
},
|
2023-02-27 16:28:45 +08:00
|
|
|
{
|
2023-02-28 15:35:36 +08:00
|
|
|
Name: "lookup htlc resolution",
|
|
|
|
TestFunc: testLookupHtlcResolution,
|
2023-02-27 16:28:45 +08:00
|
|
|
},
|
2021-12-22 11:48:55 +01:00
|
|
|
{
|
2024-11-09 15:41:48 +08:00
|
|
|
Name: "channel fundmax error",
|
|
|
|
TestFunc: testChannelFundMaxError,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "channel fundmax wallet amount",
|
|
|
|
TestFunc: testChannelFundMaxWalletAmount,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "channel fundmax anchor reserve",
|
|
|
|
TestFunc: testChannelFundMaxAnchorReserve,
|
2021-12-22 11:48:55 +01:00
|
|
|
},
|
2023-04-07 19:10:27 +08:00
|
|
|
{
|
|
|
|
Name: "htlc timeout resolver extract preimage remote",
|
|
|
|
TestFunc: testHtlcTimeoutResolverExtractPreimageRemote,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "htlc timeout resolver extract preimage local",
|
|
|
|
TestFunc: testHtlcTimeoutResolverExtractPreimageLocal,
|
|
|
|
},
|
2023-04-25 09:38:41 -04:00
|
|
|
{
|
|
|
|
Name: "custom features",
|
|
|
|
TestFunc: testCustomFeatures,
|
|
|
|
},
|
2023-06-14 06:14:17 +08:00
|
|
|
{
|
2024-11-16 13:36:59 +08:00
|
|
|
Name: "update pending open channels on funder side",
|
|
|
|
TestFunc: testUpdateOnFunderPendingOpenChannels,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "update pending open channels on fundee side",
|
|
|
|
TestFunc: testUpdateOnFundeePendingOpenChannels,
|
2023-06-14 06:14:17 +08:00
|
|
|
},
|
2024-08-22 11:20:18 +02:00
|
|
|
{
|
|
|
|
Name: "blinded payment htlc re-forward",
|
|
|
|
TestFunc: testBlindedPaymentHTLCReForward,
|
|
|
|
},
|
2022-10-31 11:31:41 -04:00
|
|
|
{
|
|
|
|
Name: "query blinded route",
|
|
|
|
TestFunc: testQueryBlindedRoutes,
|
|
|
|
},
|
2022-12-13 14:44:00 -05:00
|
|
|
{
|
2024-05-07 06:42:20 +02:00
|
|
|
Name: "route blinding invoices",
|
|
|
|
TestFunc: testBlindedRouteInvoices,
|
2022-12-13 14:44:00 -05:00
|
|
|
},
|
2024-02-15 09:18:51 -05:00
|
|
|
{
|
|
|
|
Name: "receiver blinded error",
|
|
|
|
TestFunc: testReceiverBlindedError,
|
|
|
|
},
|
2024-02-15 09:55:41 -05:00
|
|
|
{
|
|
|
|
Name: "relayer blinded error",
|
|
|
|
TestFunc: testRelayingBlindedError,
|
|
|
|
},
|
2024-02-15 10:13:41 -05:00
|
|
|
{
|
|
|
|
Name: "introduction blinded error",
|
|
|
|
TestFunc: testIntroductionNodeError,
|
|
|
|
},
|
2024-03-15 11:53:52 -04:00
|
|
|
{
|
|
|
|
Name: "disable introduction node",
|
|
|
|
TestFunc: testDisableIntroductionNode,
|
|
|
|
},
|
2024-04-08 11:46:43 -04:00
|
|
|
{
|
|
|
|
Name: "on chain to blinded",
|
|
|
|
TestFunc: testErrorHandlingOnChainFailure,
|
|
|
|
},
|
2024-05-07 12:24:55 +02:00
|
|
|
{
|
|
|
|
Name: "mpp to single blinded path",
|
|
|
|
TestFunc: testMPPToSingleBlindedPath,
|
|
|
|
},
|
2024-07-10 12:13:50 +02:00
|
|
|
{
|
|
|
|
Name: "mpp to multiple blinded paths",
|
|
|
|
TestFunc: testMPPToMultipleBlindedPaths,
|
|
|
|
},
|
2024-07-08 08:37:56 +02:00
|
|
|
{
|
|
|
|
Name: "route blinding dummy hops",
|
|
|
|
TestFunc: testBlindedRouteDummyHops,
|
|
|
|
},
|
2023-11-07 13:05:18 +01:00
|
|
|
{
|
|
|
|
Name: "removetx",
|
|
|
|
TestFunc: testRemoveTx,
|
|
|
|
},
|
2024-02-01 20:47:10 +01:00
|
|
|
{
|
|
|
|
Name: "listsweeps",
|
|
|
|
TestFunc: testListSweeps,
|
|
|
|
},
|
2024-01-21 16:30:32 +00:00
|
|
|
{
|
|
|
|
Name: "fail funding flow psbt",
|
|
|
|
TestFunc: testPsbtChanFundingFailFlow,
|
|
|
|
},
|
2024-01-11 19:05:32 -08:00
|
|
|
{
|
|
|
|
Name: "coop close with htlcs",
|
|
|
|
TestFunc: testCoopCloseWithHtlcs,
|
|
|
|
},
|
2024-02-21 09:46:33 -08:00
|
|
|
{
|
|
|
|
Name: "open channel locked balance",
|
|
|
|
TestFunc: testOpenChannelLockedBalance,
|
|
|
|
},
|
2024-04-01 21:28:54 +08:00
|
|
|
{
|
2024-05-15 23:15:26 +08:00
|
|
|
Name: "sweep cpfp anchor outgoing timeout",
|
|
|
|
TestFunc: testSweepCPFPAnchorOutgoingTimeout,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "sweep cpfp anchor incoming timeout",
|
|
|
|
TestFunc: testSweepCPFPAnchorIncomingTimeout,
|
2024-04-01 21:28:54 +08:00
|
|
|
},
|
2024-04-04 02:15:12 +08:00
|
|
|
{
|
|
|
|
Name: "sweep htlcs",
|
|
|
|
TestFunc: testSweepHTLCs,
|
|
|
|
},
|
2024-04-12 17:52:21 +08:00
|
|
|
{
|
|
|
|
Name: "sweep commit output and anchor",
|
|
|
|
TestFunc: testSweepCommitOutputAndAnchor,
|
|
|
|
},
|
2024-05-30 17:44:30 -07:00
|
|
|
{
|
|
|
|
Name: "coop close with external delivery",
|
|
|
|
TestFunc: testCoopCloseWithExternalDelivery,
|
|
|
|
},
|
2023-11-13 15:25:12 +08:00
|
|
|
{
|
|
|
|
Name: "payment failed htlc local swept",
|
|
|
|
TestFunc: testPaymentFailedHTLCLocalSwept,
|
|
|
|
},
|
2024-11-09 00:59:15 +08:00
|
|
|
{
|
|
|
|
Name: "payment failed htlc local swept resumed",
|
|
|
|
TestFunc: testPaymentFailedHTLCLocalSweptResumed,
|
|
|
|
},
|
2023-11-13 15:25:12 +08:00
|
|
|
{
|
|
|
|
Name: "payment succeeded htlc remote swept",
|
|
|
|
TestFunc: testPaymentSucceededHTLCRemoteSwept,
|
|
|
|
},
|
2023-11-13 15:50:29 +08:00
|
|
|
{
|
|
|
|
Name: "send to route failed htlc timeout",
|
|
|
|
TestFunc: testSendToRouteFailHTLCTimeout,
|
|
|
|
},
|
2024-11-09 00:59:15 +08:00
|
|
|
{
|
|
|
|
Name: "send to route failed htlc timeout resumed",
|
|
|
|
TestFunc: testSendToRouteFailHTLCTimeoutResumed,
|
|
|
|
},
|
2024-11-18 12:15:00 -03:00
|
|
|
{
|
|
|
|
Name: "debuglevel show",
|
|
|
|
TestFunc: testDebuglevelShow,
|
|
|
|
},
|
2024-10-31 16:02:36 -04:00
|
|
|
{
|
|
|
|
Name: "experimental endorsement",
|
|
|
|
TestFunc: testExperimentalEndorsement,
|
|
|
|
},
|
2024-03-12 12:26:01 -07:00
|
|
|
{
|
|
|
|
Name: "quiescence",
|
|
|
|
TestFunc: testQuiescence,
|
|
|
|
},
|
2024-09-17 15:20:25 +02:00
|
|
|
{
|
|
|
|
Name: "invoice migration",
|
|
|
|
TestFunc: testInvoiceMigration,
|
|
|
|
},
|
2022-07-22 17:34:36 +08:00
|
|
|
}
|
2024-10-18 05:26:52 +08:00
|
|
|
|
2024-12-04 06:29:22 +08:00
|
|
|
// appendPrefixed is used to add a prefix to each test name in the subtests
|
|
|
|
// before appending them to the main test cases.
|
|
|
|
func appendPrefixed(prefix string, testCases,
|
|
|
|
subtestCases []*lntest.TestCase) []*lntest.TestCase {
|
|
|
|
|
|
|
|
for _, tc := range subtestCases {
|
|
|
|
name := fmt.Sprintf("%s-%s", prefix, tc.Name)
|
|
|
|
testCases = append(testCases, &lntest.TestCase{
|
|
|
|
Name: name,
|
|
|
|
TestFunc: tc.TestFunc,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
|
|
|
return testCases
|
|
|
|
}
|
|
|
|
|
2024-10-18 05:26:52 +08:00
|
|
|
func init() {
|
|
|
|
// Register subtests.
|
2024-12-04 06:29:22 +08:00
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"multihop", allTestCases, multiHopForceCloseTestCases,
|
|
|
|
)
|
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"watchtower", allTestCases, watchtowerTestCases,
|
|
|
|
)
|
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"psbt", allTestCases, psbtFundingTestCases,
|
|
|
|
)
|
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"remote signer", allTestCases, remoteSignerTestCases,
|
|
|
|
)
|
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"channel backup", allTestCases, channelRestoreTestCases,
|
|
|
|
)
|
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"utxo selection", allTestCases, fundUtxoSelectionTestCases,
|
|
|
|
)
|
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"zero conf", allTestCases, zeroConfPolicyTestCases,
|
|
|
|
)
|
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"channel fee policy", allTestCases, channelFeePolicyTestCases,
|
|
|
|
)
|
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"wallet import account", allTestCases,
|
|
|
|
walletImportAccountTestCases,
|
|
|
|
)
|
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"funding", allTestCases, basicFundingTestCases,
|
|
|
|
)
|
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"send to route", allTestCases, sendToRouteTestCases,
|
|
|
|
)
|
2025-01-24 11:39:14 +08:00
|
|
|
allTestCases = appendPrefixed(
|
|
|
|
"channel force close", allTestCases, channelForceCloseTestCases,
|
|
|
|
)
|
2024-11-07 23:19:19 +08:00
|
|
|
|
|
|
|
// Prepare the test cases for windows to exclude some of the flaky
|
|
|
|
// ones.
|
|
|
|
//
|
|
|
|
// NOTE: We need to run this before the isWindowsOS check to make sure
|
|
|
|
// the excluded tests are found in allTestCases. Otherwise, if a
|
|
|
|
// non-existing test is included in excludedTestsWindows, we won't be
|
|
|
|
// able to find it until it's pushed to the CI, which creates a much
|
|
|
|
// longer feedback loop.
|
|
|
|
windowsTestCases := filterWindowsFlakyTests()
|
|
|
|
|
|
|
|
// If this is Windows, we'll skip running some of the flaky tests.
|
|
|
|
if isWindowsOS() {
|
|
|
|
allTestCases = windowsTestCases
|
|
|
|
}
|
2024-10-18 05:26:52 +08:00
|
|
|
}
|