diff --git a/funding/manager.go b/funding/manager.go index bd5b3a188..aa7e38a29 100644 --- a/funding/manager.go +++ b/funding/manager.go @@ -1261,6 +1261,16 @@ func (f *Manager) stateStep(channel *channeldb.OpenChannel, err) } + // After the fee parameters have been stored in the + // announcement we can delete them from the database. For + // private channels we do not announce the channel policy to + // the network but still need to delete them from the database. + err = f.deleteInitialForwardingPolicy(chanID) + if err != nil { + log.Infof("Could not delete initial policy for chanId "+ + "%x", chanID) + } + log.Debugf("Channel(%v) with ShortChanID %v: successfully "+ "announced", chanID, shortChanID) @@ -3286,15 +3296,6 @@ func (f *Manager) annAfterSixConfs(completeChan *channeldb.OpenChannel, return fmt.Errorf("unable to send node announcement "+ "to peer %x: %v", pubKey, err) } - - // For private channels we do not announce the channel policy - // to the network but still need to delete them from the - // database. - err = f.deleteInitialForwardingPolicy(chanID) - if err != nil { - log.Infof("Could not delete channel fees "+ - "for chanId %x.", chanID) - } } else { // Otherwise, we'll wait until the funding transaction has // reached 6 confirmations before announcing it. @@ -3978,14 +3979,6 @@ func (f *Manager) announceChannel(localIDKey, remoteIDKey *btcec.PublicKey, return err } - // After the fee parameters have been stored in the announcement - // we can delete them from the database. - err = f.deleteInitialForwardingPolicy(chanID) - if err != nil { - log.Infof("Could not delete channel fees for chanId %x.", - chanID) - } - // We only send the channel proof announcement and the node announcement // because addToRouterGraph previously sent the ChannelAnnouncement and // the ChannelUpdate announcement messages. The channel proof and node