mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-01 18:27:43 +02:00
netann: decode features when creating chan ann from stored chan info
This was the only field not properly set when creating a lnwire.ChannelAnnouncement from a channeldb.ChannelEdgeInfo.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package netann
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
||||
"github.com/lightningnetwork/lnd/channeldb"
|
||||
"github.com/lightningnetwork/lnd/lnwire"
|
||||
)
|
||||
@@ -30,7 +32,10 @@ func CreateChanAnnouncement(chanProof *channeldb.ChannelAuthProof,
|
||||
ExtraOpaqueData: chanInfo.ExtraOpaqueData,
|
||||
}
|
||||
|
||||
var err error
|
||||
err := chanAnn.Features.Decode(bytes.NewReader(chanInfo.Features))
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
chanAnn.BitcoinSig1, err = lnwire.NewSigFromRawSignature(
|
||||
chanProof.BitcoinSig1Bytes,
|
||||
)
|
||||
|
Reference in New Issue
Block a user