mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
Removed log should *always* be backed up before truncate
This commit is contained in:
parent
5b0fc60fe2
commit
2caa0b79e0
1 changed files with 3 additions and 2 deletions
|
@ -187,11 +187,12 @@ impl RemoveLog {
|
|||
// DEBUG
|
||||
let _ = self.flush_truncate(last_offs);
|
||||
|
||||
// backing it up before truncating
|
||||
self.removed_bak = self.removed.clone();
|
||||
|
||||
if last_offs == 0 {
|
||||
self.removed = vec![];
|
||||
} else {
|
||||
// backing it up before truncating
|
||||
self.removed_bak = self.removed.clone();
|
||||
self.removed = self.removed
|
||||
.iter()
|
||||
.filter(|&&(_, idx)| idx < last_offs)
|
||||
|
|
Loading…
Reference in a new issue