Skip to content

Commit

Permalink
fixed showing previous orphaned block on missing slots
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Aug 3, 2023
1 parent d9f67ec commit 152d96d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion handlers/slot.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ func buildSlotPageData(blockSlot int64, blockRoot []byte) (*models.SlotPageData,
if blockData == nil && err == nil {
// check for orphaned block
if blockSlot > -1 {
dbBlocks := services.GlobalBeaconService.GetDbBlocksForSlots(uint64(blockSlot), 1, true)
dbBlocks := services.GlobalBeaconService.GetDbBlocksForSlots(uint64(blockSlot), 0, true)
if len(dbBlocks) > 0 {
blockRoot = dbBlocks[0].Root
}
Expand Down

0 comments on commit 152d96d

Please sign in to comment.