diff --git a/feature/manager_internal_test.go b/feature/manager_internal_test.go index a5254192c..dc254adf9 100644 --- a/feature/manager_internal_test.go +++ b/feature/manager_internal_test.go @@ -23,7 +23,7 @@ var testSetDesc = setDesc{ SetInit: {}, // I SetNodeAnn: {}, // N }, - lnwire.StaticRemoteKeyOptional: { + lnwire.StaticRemoteKeyRequired: { SetInit: {}, // I SetNodeAnn: {}, // N }, @@ -108,6 +108,7 @@ func testManager(t *testing.T, test managerTest) { assertUnset(lnwire.TLVOnionPayloadOptional) } if test.cfg.NoStaticRemoteKey { + assertUnset(lnwire.StaticRemoteKeyRequired) assertUnset(lnwire.StaticRemoteKeyOptional) } if test.cfg.NoAnchors { @@ -133,7 +134,7 @@ func testManager(t *testing.T, test managerTest) { assertSet(lnwire.TLVOnionPayloadRequired) } if !test.cfg.NoStaticRemoteKey { - assertSet(lnwire.StaticRemoteKeyOptional) + assertSet(lnwire.StaticRemoteKeyRequired) } } diff --git a/funding/commitment_type_negotiation_test.go b/funding/commitment_type_negotiation_test.go index 90341c6df..b47e4a1f2 100644 --- a/funding/commitment_type_negotiation_test.go +++ b/funding/commitment_type_negotiation_test.go @@ -31,7 +31,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { lnwire.AnchorsZeroFeeHtlcTxRequired, ), localFeatures: lnwire.NewRawFeatureVector( - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, lnwire.ExplicitChannelTypeOptional, ), @@ -39,6 +39,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { lnwire.StaticRemoteKeyOptional, lnwire.AnchorsZeroFeeHtlcTxOptional, ), + //nolint:lll expectsCommitType: lnwallet.CommitmentTypeAnchorsZeroFeeHtlcTx, expectsChanType: nil, expectsErr: nil, @@ -50,7 +51,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { lnwire.AnchorsZeroFeeHtlcTxRequired, ), localFeatures: lnwire.NewRawFeatureVector( - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, lnwire.ExplicitChannelTypeOptional, ), @@ -70,7 +71,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { ), localFeatures: lnwire.NewRawFeatureVector( lnwire.ZeroConfOptional, - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, lnwire.ScriptEnforcedLeaseOptional, lnwire.ExplicitChannelTypeOptional, @@ -103,7 +104,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { ), localFeatures: lnwire.NewRawFeatureVector( lnwire.ZeroConfOptional, - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, lnwire.ExplicitChannelTypeOptional, ), @@ -134,7 +135,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { ), localFeatures: lnwire.NewRawFeatureVector( lnwire.ScidAliasOptional, - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, lnwire.ScriptEnforcedLeaseOptional, lnwire.ExplicitChannelTypeOptional, @@ -167,7 +168,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { ), localFeatures: lnwire.NewRawFeatureVector( lnwire.ScidAliasOptional, - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, lnwire.ExplicitChannelTypeOptional, ), @@ -195,7 +196,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { lnwire.AnchorsZeroFeeHtlcTxRequired, ), localFeatures: lnwire.NewRawFeatureVector( - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, lnwire.ExplicitChannelTypeOptional, ), @@ -219,7 +220,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { lnwire.StaticRemoteKeyRequired, ), localFeatures: lnwire.NewRawFeatureVector( - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, lnwire.ExplicitChannelTypeOptional, ), @@ -240,7 +241,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { name: "explicit legacy", channelFeatures: lnwire.NewRawFeatureVector(), localFeatures: lnwire.NewRawFeatureVector( - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, lnwire.ExplicitChannelTypeOptional, ), @@ -262,7 +263,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { name: "default explicit anchors", channelFeatures: nil, localFeatures: lnwire.NewRawFeatureVector( - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, lnwire.ExplicitChannelTypeOptional, ), @@ -284,7 +285,7 @@ func TestCommitmentTypeNegotiation(t *testing.T) { name: "implicit tweakless", channelFeatures: nil, localFeatures: lnwire.NewRawFeatureVector( - lnwire.StaticRemoteKeyOptional, + lnwire.StaticRemoteKeyRequired, lnwire.AnchorsZeroFeeHtlcTxOptional, ), remoteFeatures: lnwire.NewRawFeatureVector( diff --git a/itest/lnd_channel_force_close_test.go b/itest/lnd_channel_force_close_test.go index 71950f81f..cd22e524a 100644 --- a/itest/lnd_channel_force_close_test.go +++ b/itest/lnd_channel_force_close_test.go @@ -245,7 +245,6 @@ func testChannelForceClosure(ht *lntest.HarnessTest) { // We'll test the scenario for some of the commitment types, to ensure // outputs can be swept. commitTypes := []lnrpc.CommitmentType{ - lnrpc.CommitmentType_LEGACY, lnrpc.CommitmentType_ANCHORS, lnrpc.CommitmentType_SIMPLE_TAPROOT, } diff --git a/itest/lnd_funding_test.go b/itest/lnd_funding_test.go index e28049417..c519a360b 100644 --- a/itest/lnd_funding_test.go +++ b/itest/lnd_funding_test.go @@ -32,7 +32,6 @@ func testBasicChannelFunding(ht *lntest.HarnessTest) { // Run through the test with combinations of all the different // commitment types. allTypes := []lnrpc.CommitmentType{ - lnrpc.CommitmentType_LEGACY, lnrpc.CommitmentType_STATIC_REMOTE_KEY, lnrpc.CommitmentType_ANCHORS, lnrpc.CommitmentType_SIMPLE_TAPROOT, diff --git a/itest/lnd_multi-hop_test.go b/itest/lnd_multi-hop_test.go index 0e1120f3d..1c0cd1007 100644 --- a/itest/lnd_multi-hop_test.go +++ b/itest/lnd_multi-hop_test.go @@ -30,10 +30,6 @@ var commitWithZeroConf = []struct { commitType lnrpc.CommitmentType zeroConf bool }{ - { - commitType: lnrpc.CommitmentType_LEGACY, - zeroConf: false, - }, { commitType: lnrpc.CommitmentType_ANCHORS, zeroConf: false, diff --git a/itest/lnd_payment_test.go b/itest/lnd_payment_test.go index 28d499a5b..d3d61582b 100644 --- a/itest/lnd_payment_test.go +++ b/itest/lnd_payment_test.go @@ -26,7 +26,6 @@ func testSendDirectPayment(ht *lntest.HarnessTest) { // Create a list of commitment types we want to test. commitTyes := []lnrpc.CommitmentType{ - lnrpc.CommitmentType_LEGACY, lnrpc.CommitmentType_ANCHORS, lnrpc.CommitmentType_SIMPLE_TAPROOT, } diff --git a/itest/lnd_revocation_test.go b/itest/lnd_revocation_test.go index 4350c92a2..1b6a5eac4 100644 --- a/itest/lnd_revocation_test.go +++ b/itest/lnd_revocation_test.go @@ -195,7 +195,6 @@ func breachRetributionTestCase(ht *lntest.HarnessTest, // the mempool. func testRevokedCloseRetribution(ht *lntest.HarnessTest) { for _, commitType := range []lnrpc.CommitmentType{ - lnrpc.CommitmentType_LEGACY, lnrpc.CommitmentType_SIMPLE_TAPROOT, } { testName := fmt.Sprintf("%v", commitType.String()) @@ -378,7 +377,6 @@ func revokedCloseRetributionZeroValueRemoteOutputCase(ht *lntest.HarnessTest, // commitment output has zero-value. func testRevokedCloseRetributionZeroValueRemoteOutput(ht *lntest.HarnessTest) { for _, commitType := range []lnrpc.CommitmentType{ - lnrpc.CommitmentType_LEGACY, lnrpc.CommitmentType_SIMPLE_TAPROOT, } { testName := fmt.Sprintf("%v", commitType.String()) @@ -700,7 +698,6 @@ func revokedCloseRetributionRemoteHodlCase(ht *lntest.HarnessTest, // remote party breaches before settling extended HTLCs. func testRevokedCloseRetributionRemoteHodl(ht *lntest.HarnessTest) { for _, commitType := range []lnrpc.CommitmentType{ - lnrpc.CommitmentType_LEGACY, lnrpc.CommitmentType_SIMPLE_TAPROOT, } { testName := fmt.Sprintf("%v", commitType.String())