Skip to content

Commit

Permalink
🎨 Add internal kernel API /api/block/getBlocksIndexes #10608
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Mar 18, 2024
1 parent dc95dc3 commit 1d3e28d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kernel/model/blockinfo.go
Original file line number Diff line number Diff line change
Expand Up @@ -293,11 +293,14 @@ func GetBlocksIndexes(ids []string) (ret map[string]int) {
}

if !n.IsChildBlockOf(tree.Root, 1) {
if n.IsBlock() {
nodesIndexes[n.ID] = idx
}
return ast.WalkContinue
}

nodesIndexes[n.ID] = idx
idx++
nodesIndexes[n.ID] = idx
return ast.WalkContinue
})

Expand Down

0 comments on commit 1d3e28d

Please sign in to comment.