2022-07-22 02:55:38 +02:00
|
|
|
//go:build rpctest
|
|
|
|
// +build rpctest
|
|
|
|
|
|
|
|
package itest
|
|
|
|
|
|
|
|
import "github.com/lightningnetwork/lnd/lntemp"
|
|
|
|
|
|
|
|
// TODO(yy): remove the temp.
|
2022-07-22 11:34:36 +02:00
|
|
|
var allTestCasesTemp = []*lntemp.TestCase{
|
|
|
|
{
|
|
|
|
Name: "update channel status",
|
|
|
|
TestFunc: testUpdateChanStatus,
|
|
|
|
},
|
2022-07-26 06:12:18 +02:00
|
|
|
{
|
|
|
|
Name: "basic funding flow",
|
|
|
|
TestFunc: testBasicChannelFunding,
|
|
|
|
},
|
2022-07-28 14:15:22 +02:00
|
|
|
{
|
2022-08-15 13:03:14 +02:00
|
|
|
Name: "multi hop htlc local timeout",
|
|
|
|
TestFunc: testMultiHopHtlcLocalTimeout,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "multi hop receiver chain claim",
|
|
|
|
TestFunc: testMultiHopReceiverChainClaim,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "multi hop local force close on-chain htlc timeout",
|
|
|
|
TestFunc: testMultiHopLocalForceCloseOnChainHtlcTimeout,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "multi hop remote force close on-chain htlc timeout",
|
|
|
|
TestFunc: testMultiHopRemoteForceCloseOnChainHtlcTimeout,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "multi hop htlc local chain claim",
|
|
|
|
TestFunc: testMultiHopHtlcLocalChainClaim,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "multi hop htlc remote chain claim",
|
|
|
|
TestFunc: testMultiHopHtlcRemoteChainClaim,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "multi hop htlc aggregation",
|
|
|
|
TestFunc: testMultiHopHtlcAggregation,
|
2022-07-28 14:15:22 +02:00
|
|
|
},
|
2022-07-26 11:00:27 +02:00
|
|
|
{
|
|
|
|
Name: "external channel funding",
|
|
|
|
TestFunc: testExternalFundingChanPoint,
|
|
|
|
},
|
2022-07-28 11:44:23 +02:00
|
|
|
{
|
2022-08-17 10:53:07 +02:00
|
|
|
Name: "channel backup restore basic",
|
|
|
|
TestFunc: testChannelBackupRestoreBasic,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "channel backup restore unconfirmed",
|
|
|
|
TestFunc: testChannelBackupRestoreUnconfirmed,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "channel backup restore commit types",
|
|
|
|
TestFunc: testChannelBackupRestoreCommitTypes,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "channel backup restore force close",
|
|
|
|
TestFunc: testChannelBackupRestoreForceClose,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
Name: "channel backup restore legacy",
|
|
|
|
TestFunc: testChannelBackupRestoreLegacy,
|
2022-07-28 11:44:23 +02:00
|
|
|
},
|
2022-07-28 12:25:06 +02:00
|
|
|
{
|
|
|
|
Name: "data loss protection",
|
|
|
|
TestFunc: testDataLossProtection,
|
|
|
|
},
|
2022-08-02 14:56:13 +02:00
|
|
|
{
|
|
|
|
Name: "sweep coins",
|
|
|
|
TestFunc: testSweepAllCoins,
|
|
|
|
},
|
2022-08-02 15:15:49 +02:00
|
|
|
{
|
|
|
|
Name: "disconnecting target peer",
|
|
|
|
TestFunc: testDisconnectingTargetPeer,
|
|
|
|
},
|
2022-08-02 18:25:19 +02:00
|
|
|
{
|
|
|
|
Name: "sphinx replay persistence",
|
|
|
|
TestFunc: testSphinxReplayPersistence,
|
|
|
|
},
|
2022-08-02 19:00:20 +02:00
|
|
|
{
|
|
|
|
Name: "list channels",
|
|
|
|
TestFunc: testListChannels,
|
|
|
|
},
|
2022-08-03 15:29:25 +02:00
|
|
|
{
|
|
|
|
Name: "max pending channel",
|
|
|
|
TestFunc: testMaxPendingChannels,
|
|
|
|
},
|
2022-08-03 18:34:01 +02:00
|
|
|
{
|
|
|
|
Name: "garbage collect link nodes",
|
|
|
|
TestFunc: testGarbageCollectLinkNodes,
|
|
|
|
},
|
2022-08-03 18:37:47 +02:00
|
|
|
{
|
|
|
|
Name: "reject onward htlc",
|
|
|
|
TestFunc: testRejectHTLC,
|
|
|
|
},
|
2022-08-03 18:40:47 +02:00
|
|
|
{
|
|
|
|
Name: "node sign verify",
|
|
|
|
TestFunc: testNodeSignVerify,
|
|
|
|
},
|
2022-08-18 11:30:34 +02:00
|
|
|
{
|
|
|
|
Name: "list addresses",
|
|
|
|
TestFunc: testListAddresses,
|
|
|
|
},
|
2022-08-03 18:49:39 +02:00
|
|
|
{
|
|
|
|
Name: "abandonchannel",
|
|
|
|
TestFunc: testAbandonChannel,
|
|
|
|
},
|
2022-08-03 19:00:09 +02:00
|
|
|
{
|
|
|
|
Name: "recovery info",
|
|
|
|
TestFunc: testGetRecoveryInfo,
|
|
|
|
},
|
2022-08-03 19:08:52 +02:00
|
|
|
{
|
|
|
|
Name: "onchain fund recovery",
|
|
|
|
TestFunc: testOnchainFundRecovery,
|
|
|
|
},
|
2022-12-08 11:48:51 +01:00
|
|
|
{
|
|
|
|
Name: "wallet rescan address detection",
|
|
|
|
TestFunc: testRescanAddressDetection,
|
|
|
|
},
|
2022-08-03 19:22:05 +02:00
|
|
|
{
|
|
|
|
Name: "basic funding flow with all input types",
|
|
|
|
TestFunc: testChannelFundingInputTypes,
|
|
|
|
},
|
2022-08-03 19:35:18 +02:00
|
|
|
{
|
|
|
|
Name: "unconfirmed channel funding",
|
|
|
|
TestFunc: testUnconfirmedChannelFunding,
|
|
|
|
},
|
2022-08-03 20:36:12 +02:00
|
|
|
{
|
|
|
|
Name: "funding flow persistence",
|
|
|
|
TestFunc: testChannelFundingPersistence,
|
|
|
|
},
|
2022-08-03 20:48:19 +02:00
|
|
|
{
|
|
|
|
Name: "batch channel funding",
|
|
|
|
TestFunc: testBatchChanFunding,
|
|
|
|
},
|
2022-08-03 21:38:09 +02:00
|
|
|
{
|
|
|
|
Name: "update channel policy",
|
|
|
|
TestFunc: testUpdateChannelPolicy,
|
|
|
|
},
|
2022-08-03 23:37:43 +02:00
|
|
|
{
|
|
|
|
Name: "send update disable channel",
|
|
|
|
TestFunc: testSendUpdateDisableChannel,
|
|
|
|
},
|
2022-08-04 00:10:44 +02:00
|
|
|
{
|
|
|
|
Name: "private channel update policy",
|
|
|
|
TestFunc: testUpdateChannelPolicyForPrivateChannel,
|
|
|
|
},
|
2022-08-04 00:14:06 +02:00
|
|
|
{
|
|
|
|
Name: "update channel policy fee rate accuracy",
|
|
|
|
TestFunc: testUpdateChannelPolicyFeeRateAccuracy,
|
|
|
|
},
|
2022-08-04 00:20:13 +02:00
|
|
|
{
|
|
|
|
Name: "connection timeout",
|
|
|
|
TestFunc: testNetworkConnectionTimeout,
|
|
|
|
},
|
2022-08-04 00:28:31 +02:00
|
|
|
{
|
|
|
|
Name: "reconnect after ip change",
|
|
|
|
TestFunc: testReconnectAfterIPChange,
|
|
|
|
},
|
2022-08-04 00:32:20 +02:00
|
|
|
{
|
|
|
|
Name: "addpeer config",
|
|
|
|
TestFunc: testAddPeerConfig,
|
|
|
|
},
|
2022-08-04 00:36:36 +02:00
|
|
|
{
|
|
|
|
Name: "unannounced channels",
|
|
|
|
TestFunc: testUnannouncedChannels,
|
|
|
|
},
|
2022-08-04 00:46:45 +02:00
|
|
|
{
|
|
|
|
Name: "graph topology notifications",
|
|
|
|
TestFunc: testGraphTopologyNotifications,
|
|
|
|
},
|
2022-08-04 00:49:43 +02:00
|
|
|
{
|
|
|
|
Name: "node announcement",
|
|
|
|
TestFunc: testNodeAnnouncement,
|
|
|
|
},
|
2022-08-04 00:59:21 +02:00
|
|
|
{
|
|
|
|
Name: "update node announcement rpc",
|
|
|
|
TestFunc: testUpdateNodeAnnouncement,
|
|
|
|
},
|
2022-08-04 01:14:26 +02:00
|
|
|
{
|
|
|
|
Name: "list outgoing payments",
|
|
|
|
TestFunc: testListPayments,
|
|
|
|
},
|
2022-08-04 02:25:45 +02:00
|
|
|
{
|
|
|
|
Name: "immediate payment after channel opened",
|
|
|
|
TestFunc: testPaymentFollowingChannelOpen,
|
|
|
|
},
|
2022-08-04 02:37:28 +02:00
|
|
|
{
|
|
|
|
Name: "invoice update subscription",
|
|
|
|
TestFunc: testInvoiceSubscriptions,
|
|
|
|
},
|
2022-08-04 03:05:48 +02:00
|
|
|
{
|
|
|
|
Name: "streaming channel backup update",
|
|
|
|
TestFunc: testChannelBackupUpdates,
|
|
|
|
},
|
2022-08-04 03:09:35 +02:00
|
|
|
{
|
|
|
|
Name: "export channel backup",
|
|
|
|
TestFunc: testExportChannelBackup,
|
|
|
|
},
|
2022-08-04 13:59:17 +02:00
|
|
|
{
|
|
|
|
Name: "channel balance",
|
|
|
|
TestFunc: testChannelBalance,
|
|
|
|
},
|
2022-08-04 14:02:07 +02:00
|
|
|
{
|
|
|
|
Name: "channel unsettled balance",
|
|
|
|
TestFunc: testChannelUnsettledBalance,
|
|
|
|
},
|
2022-08-04 14:15:01 +02:00
|
|
|
{
|
|
|
|
Name: "commitment deadline",
|
|
|
|
TestFunc: testCommitmentTransactionDeadline,
|
|
|
|
},
|
2022-08-04 16:19:46 +02:00
|
|
|
{
|
|
|
|
Name: "channel force closure",
|
|
|
|
TestFunc: testChannelForceClosure,
|
|
|
|
},
|
2022-08-04 16:28:27 +02:00
|
|
|
{
|
|
|
|
Name: "failing link",
|
|
|
|
TestFunc: testFailingChannel,
|
|
|
|
},
|
2022-12-02 14:40:19 +01:00
|
|
|
{
|
|
|
|
Name: "chain kit",
|
|
|
|
TestFunc: testChainKit,
|
|
|
|
},
|
2022-08-18 18:16:27 +02:00
|
|
|
{
|
|
|
|
Name: "neutrino kit",
|
|
|
|
TestFunc: testNeutrino,
|
|
|
|
},
|
2022-08-04 21:34:42 +02:00
|
|
|
{
|
|
|
|
Name: "etcd failover",
|
|
|
|
TestFunc: testEtcdFailover,
|
|
|
|
},
|
2022-08-05 11:48:35 +02:00
|
|
|
{
|
|
|
|
Name: "hold invoice force close",
|
|
|
|
TestFunc: testHoldInvoiceForceClose,
|
|
|
|
},
|
2022-08-05 11:59:00 +02:00
|
|
|
{
|
|
|
|
Name: "hold invoice sender persistence",
|
|
|
|
TestFunc: testHoldInvoicePersistence,
|
|
|
|
},
|
2022-08-05 12:12:11 +02:00
|
|
|
{
|
|
|
|
Name: "maximum channel size",
|
|
|
|
TestFunc: testMaxChannelSize,
|
|
|
|
},
|
2022-08-05 12:15:48 +02:00
|
|
|
{
|
|
|
|
Name: "wumbo channels",
|
|
|
|
TestFunc: testWumboChannels,
|
|
|
|
},
|
2022-08-05 12:22:19 +02:00
|
|
|
{
|
|
|
|
Name: "max htlc pathfind",
|
|
|
|
TestFunc: testMaxHtlcPathfind,
|
|
|
|
},
|
2022-08-05 12:36:15 +02:00
|
|
|
{
|
|
|
|
Name: "multi-hop htlc error propagation",
|
|
|
|
TestFunc: testHtlcErrorPropagation,
|
|
|
|
},
|
2022-08-05 12:44:52 +02:00
|
|
|
{
|
|
|
|
Name: "multi-hop payments",
|
|
|
|
TestFunc: testMultiHopPayments,
|
|
|
|
},
|
2022-08-06 23:50:49 +02:00
|
|
|
{
|
|
|
|
Name: "anchors reserved value",
|
|
|
|
TestFunc: testAnchorReservedValue,
|
|
|
|
},
|
2022-08-07 00:06:02 +02:00
|
|
|
{
|
|
|
|
Name: "3rd party anchor spend",
|
|
|
|
TestFunc: testAnchorThirdPartySpend,
|
|
|
|
},
|
2022-08-07 01:53:43 +02:00
|
|
|
{
|
|
|
|
Name: "open channel reorg test",
|
|
|
|
TestFunc: testOpenChannelAfterReorg,
|
|
|
|
},
|
2022-07-22 11:34:36 +02:00
|
|
|
}
|