mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-04 02:36:17 +02:00
channeldb: extend DeleteChannelEdge to mark edge as zombie
We mark the edges as zombies when pruning them to ensure we don't attempt to reprocess them later on. This also applies to channels that have been removed from the graph due to being stale.
This commit is contained in:
@@ -374,6 +374,10 @@ func TestEdgeInsertionDeletion(t *testing.T) {
|
||||
if _, _, _, err := graph.FetchChannelEdgesByID(chanID); err == nil {
|
||||
t.Fatalf("channel edge not deleted")
|
||||
}
|
||||
isZombie, _, _ := graph.IsZombieEdge(chanID)
|
||||
if !isZombie {
|
||||
t.Fatal("channel edge not marked as zombie")
|
||||
}
|
||||
|
||||
// Finally, attempt to delete a (now) non-existent edge within the
|
||||
// database, this should result in an error.
|
||||
|
Reference in New Issue
Block a user