mirror of
https://github.com/mimblewimble/grin.git
synced 2025-01-21 03:21:08 +03:00
fix off by one in setup_height (#988)
This commit is contained in:
parent
f0cf903adc
commit
c36e72d8c9
1 changed files with 1 additions and 1 deletions
|
@ -236,7 +236,7 @@ impl ChainStore for ChainKVStore {
|
|||
fn setup_height(&self, header: &BlockHeader, old_tip: &Tip) -> Result<(), Error> {
|
||||
// remove headers ahead if we backtracked
|
||||
for n in header.height..old_tip.height {
|
||||
self.delete_header_by_height(n)?;
|
||||
self.delete_header_by_height(n + 1)?;
|
||||
}
|
||||
self.build_by_height_index(header, false)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue