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:
Wilmer Paulino
2019-03-27 13:06:34 -07:00
parent b780dfacdb
commit e98f4d6d9d
2 changed files with 48 additions and 12 deletions

View File

@@ -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.