2020-01-10 17:27:48 +03:00
|
|
|
// +build rpctest
|
|
|
|
|
|
|
|
package itest
|
|
|
|
|
2020-11-04 13:03:29 +03:00
|
|
|
var allTestCases = []*testCase{
|
2020-11-04 13:03:37 +03:00
|
|
|
{
|
|
|
|
name: "test multi-hop htlc",
|
|
|
|
test: testMultiHopHtlcClaims,
|
|
|
|
},
|
2020-01-10 17:27:48 +03:00
|
|
|
{
|
|
|
|
name: "sweep coins",
|
|
|
|
test: testSweepAllCoins,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "recovery info",
|
|
|
|
test: testGetRecoveryInfo,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "onchain fund recovery",
|
|
|
|
test: testOnchainFundRecovery,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "basic funding flow",
|
|
|
|
test: testBasicChannelFunding,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "unconfirmed channel funding",
|
|
|
|
test: testUnconfirmedChannelFunding,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "update channel policy",
|
|
|
|
test: testUpdateChannelPolicy,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "open channel reorg test",
|
|
|
|
test: testOpenChannelAfterReorg,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "disconnecting target peer",
|
|
|
|
test: testDisconnectingTargetPeer,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "graph topology notifications",
|
|
|
|
test: testGraphTopologyNotifications,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "funding flow persistence",
|
|
|
|
test: testChannelFundingPersistence,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "channel force closure",
|
|
|
|
test: testChannelForceClosure,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "channel balance",
|
|
|
|
test: testChannelBalance,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "channel unsettled balance",
|
|
|
|
test: testChannelUnsettledBalance,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "single hop invoice",
|
|
|
|
test: testSingleHopInvoice,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "sphinx replay persistence",
|
|
|
|
test: testSphinxReplayPersistence,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "list channels",
|
|
|
|
test: testListChannels,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "list outgoing payments",
|
|
|
|
test: testListPayments,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "max pending channel",
|
|
|
|
test: testMaxPendingChannels,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "multi-hop payments",
|
|
|
|
test: testMultiHopPayments,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "single-hop send to route",
|
|
|
|
test: testSingleHopSendToRoute,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "multi-hop send to route",
|
|
|
|
test: testMultiHopSendToRoute,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "send to route error propagation",
|
|
|
|
test: testSendToRouteErrorPropagation,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "unannounced channels",
|
|
|
|
test: testUnannouncedChannels,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "private channels",
|
|
|
|
test: testPrivateChannels,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "invoice routing hints",
|
|
|
|
test: testInvoiceRoutingHints,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "multi-hop payments over private channels",
|
|
|
|
test: testMultiHopOverPrivateChannels,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "multiple channel creation and update subscription",
|
|
|
|
test: testBasicChannelCreationAndUpdates,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "invoice update subscription",
|
|
|
|
test: testInvoiceSubscriptions,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "multi-hop htlc error propagation",
|
|
|
|
test: testHtlcErrorPropagation,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "reject onward htlc",
|
|
|
|
test: testRejectHTLC,
|
|
|
|
},
|
|
|
|
// TODO(roasbeef): multi-path integration test
|
|
|
|
{
|
|
|
|
name: "node announcement",
|
|
|
|
test: testNodeAnnouncement,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "node sign verify",
|
|
|
|
test: testNodeSignVerify,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "derive shared key",
|
|
|
|
test: testDeriveSharedKey,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "async payments benchmark",
|
|
|
|
test: testAsyncPayments,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "async bidirectional payments",
|
|
|
|
test: testBidirectionalAsyncPayments,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "switch circuit persistence",
|
|
|
|
test: testSwitchCircuitPersistence,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "switch offline delivery",
|
|
|
|
test: testSwitchOfflineDelivery,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "switch offline delivery persistence",
|
|
|
|
test: testSwitchOfflineDeliveryPersistence,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "switch offline delivery outgoing offline",
|
|
|
|
test: testSwitchOfflineDeliveryOutgoingOffline,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
// TODO(roasbeef): test always needs to be last as Bob's state
|
|
|
|
// is borked since we trick him into attempting to cheat Alice?
|
|
|
|
name: "revoked uncooperative close retribution",
|
|
|
|
test: testRevokedCloseRetribution,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "failing link",
|
|
|
|
test: testFailingChannel,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "garbage collect link nodes",
|
|
|
|
test: testGarbageCollectLinkNodes,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "abandonchannel",
|
|
|
|
test: testAbandonChannel,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "revoked uncooperative close retribution zero value remote output",
|
|
|
|
test: testRevokedCloseRetributionZeroValueRemoteOutput,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "revoked uncooperative close retribution remote hodl",
|
|
|
|
test: testRevokedCloseRetributionRemoteHodl,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "revoked uncooperative close retribution altruist watchtower",
|
|
|
|
test: testRevokedCloseRetributionAltruistWatchtower,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "data loss protection",
|
|
|
|
test: testDataLossProtection,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "query routes",
|
|
|
|
test: testQueryRoutes,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "route fee cutoff",
|
|
|
|
test: testRouteFeeCutoff,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "send update disable channel",
|
|
|
|
test: testSendUpdateDisableChannel,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "streaming channel backup update",
|
|
|
|
test: testChannelBackupUpdates,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "export channel backup",
|
|
|
|
test: testExportChannelBackup,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "channel backup restore",
|
|
|
|
test: testChannelBackupRestore,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "hold invoice sender persistence",
|
|
|
|
test: testHoldInvoicePersistence,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "cpfp",
|
|
|
|
test: testCPFP,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "macaroon authentication",
|
|
|
|
test: testMacaroonAuthentication,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "bake macaroon",
|
|
|
|
test: testBakeMacaroon,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "delete macaroon id",
|
|
|
|
test: testDeleteMacaroonID,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "immediate payment after channel opened",
|
|
|
|
test: testPaymentFollowingChannelOpen,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "external channel funding",
|
|
|
|
test: testExternalFundingChanPoint,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "psbt channel funding",
|
|
|
|
test: testPsbtChanFunding,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "sendtoroute multi path payment",
|
|
|
|
test: testSendToRouteMultiPath,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "send multi path payment",
|
|
|
|
test: testSendMultiPathPayment,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "REST API",
|
2020-01-10 17:27:50 +03:00
|
|
|
test: testRestAPI,
|
2020-01-10 17:27:48 +03:00
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "intercept forwarded htlc packets",
|
|
|
|
test: testForwardInterceptor,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "wumbo channels",
|
|
|
|
test: testWumboChannels,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "maximum channel size",
|
|
|
|
test: testMaxChannelSize,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "connection timeout",
|
|
|
|
test: testNetworkConnectionTimeout,
|
|
|
|
},
|
2020-10-06 18:23:40 +03:00
|
|
|
{
|
|
|
|
name: "stateless init",
|
|
|
|
test: testStatelessInit,
|
|
|
|
},
|
2020-01-10 17:27:48 +03:00
|
|
|
}
|