Skip to content

Commit

Permalink
Remove warning for pruned local channel update (#2514)
Browse files Browse the repository at this point in the history
When a channel is pruned, it is removed from our graph and thus isn't
found by `d.resolve()`, but it shouldn't create a warning in the logs.
  • Loading branch information
t-bast authored Dec 1, 2022
1 parent a230395 commit 77b9aa0
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,14 @@ object Validation {
handleChannelUpdate(d1, db, nodeParams.currentBlockHeight, Left(lcu))
}
case None =>
// should never happen, we log a warning and handle the update, it will be rejected since there is no related channel
log.warning("unrecognized local channel update for channelId={} localAlias={}", lcu.channelId, lcu.shortIds.localAlias)
lcu.shortIds.real.toOption match {
case Some(realScid) if d.prunedChannels.contains(realScid) =>
log.debug("this is a known pruned local channel, processing channel_update for channelId={} scid={}", lcu.channelId, realScid)
case _ =>
// should never happen
log.warning("unrecognized local channel update for channelId={} localAlias={}", lcu.channelId, lcu.shortIds.localAlias)
}
// handle the update: it will be rejected if there is no related channel
handleChannelUpdate(d, db, nodeParams.currentBlockHeight, Left(lcu))
}
}
Expand Down

0 comments on commit 77b9aa0

Please sign in to comment.