multi: move ChannelUpdate validate methods to netann

This commit is contained in:
Elle Mouton committed 2024-09-18 16:13:18 +02:00
1 parent e07d23567c
commit 7bbf89625f
8 files changed
+82 -82

No files matched your search

+2 -2
View File
@@ -8,9 +8,9 @@ import (
"github.com/lightningnetwork/lnd/build"
"github.com/lightningnetwork/lnd/channeldb"
"github.com/lightningnetwork/lnd/channeldb/models"
"github.com/lightningnetwork/lnd/graph"
"github.com/lightningnetwork/lnd/lnutils"
"github.com/lightningnetwork/lnd/lnwire"
"github.com/lightningnetwork/lnd/netann"
"github.com/lightningnetwork/lnd/routing/route"
)
@@ -440,7 +440,7 @@ func (p *paymentSession) UpdateAdditionalEdge(msg *lnwire.ChannelUpdate1,
pubKey *btcec.PublicKey, policy *models.CachedEdgePolicy) bool {
// Validate the message signature.
if err := graph.VerifyChannelUpdateSignature(msg, pubKey); err != nil {
if err := netann.VerifyChannelUpdateSignature(msg, pubKey); err != nil {
log.Errorf(
"Unable to validate channel update signature: %v", err,
)