mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-19 12:01:27 +02:00
discovery: add detailed comment.
Describe why it is ok to resurrect zombie channels based on the timestamp of the `ReplyChannelRange` msg although its not verifiable data.
This commit is contained in:
@@ -2143,6 +2143,21 @@ func (c *ChannelGraph) FilterKnownChanIDs(chansInfo []ChannelUpdateInfo,
|
||||
zombieIndex, scid,
|
||||
)
|
||||
|
||||
// TODO(ziggie): Make sure that for the strict
|
||||
// pruning case we compare the pubkeys and
|
||||
// whether the right timestamp is not older than
|
||||
// the `ChannelPruneExpiry`.
|
||||
//
|
||||
// NOTE: The timestamp data has no verification
|
||||
// attached to it in the `ReplyChannelRange` msg
|
||||
// so we are trusting this data at this point.
|
||||
// However it is not critical because we are
|
||||
// just removing the channel from the db when
|
||||
// the timestamps are more recent. During the
|
||||
// querying of the gossip msg verification
|
||||
// happens as usual.
|
||||
// However we should start punishing peers when
|
||||
// they don't provide us honest data ?
|
||||
isStillZombie := isZombieChan(
|
||||
info.Node1UpdateTimestamp,
|
||||
info.Node2UpdateTimestamp,
|
||||
|
Reference in New Issue
Block a user