Delete values immediately from DB overlay (#1631)

* Delete values immediately from DB overlay

* Match remove behaviour; test

* Warning fixed
This commit is contained in:
Arkadiy Paronyan
2016-07-16 14:48:54 +02:00
committed by GitHub
parent 799c69c8d5
commit 64417594c7
2 changed files with 45 additions and 2 deletions

View File

@@ -295,7 +295,7 @@ impl JournalDB for OverlayRecentDB {
}
// update the overlay
for k in overlay_deletions {
journal_overlay.backing_overlay.remove(&OverlayRecentDB::to_short_key(&k));
journal_overlay.backing_overlay.remove_and_purge(&OverlayRecentDB::to_short_key(&k));
}
// apply canon deletions
for k in canon_deletions {
@@ -303,7 +303,6 @@ impl JournalDB for OverlayRecentDB {
try!(batch.delete(&k));
}
}
journal_overlay.backing_overlay.purge();
}
journal_overlay.journal.remove(&end_era);
}