cfg: rename legacyprotocol to protocol

Since we are also going to use it for experimental new features.
This commit is contained in:
Johan T. Halseth
2020-03-06 16:11:48 +01:00
parent 51c5352ae4
commit 44756b5811
5 changed files with 26 additions and 26 deletions

View File

@@ -336,13 +336,13 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB,
// Only if we're not being forced to use the legacy onion format, will
// we signal our knowledge of the new TLV onion format.
if !cfg.LegacyProtocol.LegacyOnion() {
if !cfg.ProtocolOptions.LegacyOnion() {
globalFeatures.Set(lnwire.TLVOnionPayloadOptional)
}
// Similarly, we default to the new modern commitment format unless the
// legacy commitment config is set to true.
if !cfg.LegacyProtocol.LegacyCommitment() {
if !cfg.ProtocolOptions.LegacyCommitment() {
globalFeatures.Set(lnwire.StaticRemoteKeyOptional)
}
@@ -375,8 +375,8 @@ func newServer(listenAddrs []net.Addr, chanDB *channeldb.DB,
)
featureMgr, err := feature.NewManager(feature.Config{
NoTLVOnion: cfg.LegacyProtocol.LegacyOnion(),
NoStaticRemoteKey: cfg.LegacyProtocol.LegacyCommitment(),
NoTLVOnion: cfg.ProtocolOptions.LegacyOnion(),
NoStaticRemoteKey: cfg.ProtocolOptions.LegacyCommitment(),
})
if err != nil {
return nil, err