watchtower/wtwire/init: use feature.ValidateRequired

This allows us to remove the custom error type originally implemented
for this purpose.
This commit is contained in:
Conner Fromknecht committed 2020-01-08 12:26:00 -08:00
1 parent 0f9023256e
commit 2510ec00f5
2 files changed
+5 -29

No files matched your search

+3 -2
View File
@@ -5,6 +5,7 @@ import (
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcd/chaincfg/chainhash"
"github.com/lightningnetwork/lnd/feature"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/watchtower/wtwire"
)
@@ -60,8 +61,8 @@ var checkRemoteInitTests = []checkRemoteInitTest{
lHash: testnetChainHash,
rFeatures: lnwire.NewRawFeatureVector(lnwire.GossipQueriesRequired),
rHash: testnetChainHash,
expErr: wtwire.NewErrUnknownRequiredFeatures(
lnwire.GossipQueriesRequired,
expErr: feature.NewErrUnknownRequired(
[]lnwire.FeatureBit{lnwire.GossipQueriesRequired},
),
},
}