multi: move channel announcement validation to netann

from the graph package.
This commit is contained in:
Elle Mouton
2024-09-11 12:15:44 +02:00
parent a6bf76a0b7
commit 615db1fc2e
3 changed files with 78 additions and 76 deletions

View File

@@ -1890,7 +1890,7 @@ func (d *AuthenticatedGossiper) processRejectedEdge(
if err != nil {
return nil, err
}
err = graph.ValidateChannelAnn(chanAnn)
err = netann.ValidateChannelAnn(chanAnn)
if err != nil {
err := fmt.Errorf("assembled channel announcement proof "+
"for shortChanID=%v isn't valid: %v",
@@ -2540,7 +2540,7 @@ func (d *AuthenticatedGossiper) handleChanAnnouncement(nMsg *networkMsg,
// the signatures within the proof as it should be well formed.
var proof *models.ChannelAuthProof
if nMsg.isRemote {
if err := graph.ValidateChannelAnn(ann); err != nil {
if err := netann.ValidateChannelAnn(ann); err != nil {
err := fmt.Errorf("unable to validate announcement: "+
"%v", err)
@@ -3434,7 +3434,7 @@ func (d *AuthenticatedGossiper) handleAnnSig(nMsg *networkMsg,
// With all the necessary components assembled validate the full
// channel announcement proof.
if err := graph.ValidateChannelAnn(chanAnn); err != nil {
if err := netann.ValidateChannelAnn(chanAnn); err != nil {
err := fmt.Errorf("channel announcement proof for "+
"short_chan_id=%v isn't valid: %v", shortChanID, err)