Skip to content

Commit e12b107

Browse files
authored
fix: fix backfill with null tipsets present (#6409)
1 parent 6dae8b0 commit e12b107

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949

5050
### Fixed
5151

52+
- [#6409](https://github.com/ChainSafe/forest/pull/6409) Fixed backfill issue when null tipsets are present.
53+
5254
- [#6327](https://github.com/ChainSafe/forest/pull/6327) Fixed: Forest returns 404 for all invalid api paths.
5355

5456
## Forest v0.30.5 "Dulce de Leche"

src/tool/subcommands/index_cmd.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,11 @@ impl IndexCommands {
9999
println!("Head epoch: {}", head_ts.epoch());
100100

101101
let from_ts = if let Some(from) = from {
102+
// ensure from epoch is not greater than head epoch. This can happen if the
103+
// assumed head is actually a null tipset.
104+
let from = std::cmp::min(*from, head_ts.epoch());
102105
chain_store.chain_index().tipset_by_height(
103-
*from,
106+
from,
104107
head_ts,
105108
ResolveNullTipset::TakeOlder,
106109
)?

0 commit comments

Comments
 (0)