mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
server: let gossiper hand policy update to router
ProcessLocalAnnouncement will attempt to call UpdateEdge with the new policy. If we call it manually before handing it to the gossiper, that call will fail with "Outdated" and the announcement won't propagate.
This commit is contained in:
parent
c6318eb614
commit
8826db32e8
16
server.go
16
server.go
@ -2976,22 +2976,6 @@ func extractChannelUpdate(info *channeldb.ChannelEdgeInfo,
|
||||
// applyChannelUpdate applies the channel update to the different sub-systems of
|
||||
// the server.
|
||||
func (s *server) applyChannelUpdate(update *lnwire.ChannelUpdate) error {
|
||||
newChannelPolicy := &channeldb.ChannelEdgePolicy{
|
||||
SigBytes: update.Signature.ToSignatureBytes(),
|
||||
ChannelID: update.ShortChannelID.ToUint64(),
|
||||
LastUpdate: time.Unix(int64(update.Timestamp), 0),
|
||||
Flags: update.Flags,
|
||||
TimeLockDelta: update.TimeLockDelta,
|
||||
MinHTLC: update.HtlcMinimumMsat,
|
||||
FeeBaseMSat: lnwire.MilliSatoshi(update.BaseFee),
|
||||
FeeProportionalMillionths: lnwire.MilliSatoshi(update.FeeRate),
|
||||
}
|
||||
|
||||
err := s.chanRouter.UpdateEdge(newChannelPolicy)
|
||||
if err != nil && !routing.IsError(err, routing.ErrIgnored) {
|
||||
return err
|
||||
}
|
||||
|
||||
pubKey := s.identityPriv.PubKey()
|
||||
errChan := s.authGossiper.ProcessLocalAnnouncement(update, pubKey)
|
||||
select {
|
||||
|
Loading…
Reference in New Issue
Block a user