Skip to content

Commit

Permalink
Remove parent lookup from issue (#3132)
Browse files Browse the repository at this point in the history
  • Loading branch information
StephenButtolph committed Jun 27, 2024
1 parent 267c020 commit c587d91
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions snow/engine/snowman/transitive.go
Original file line number Diff line number Diff line change
Expand Up @@ -827,12 +827,10 @@ func (t *Transitive) issue(
issuedMetric: issuedMetric,
}

// block on the parent if needed
var (
parentID = blk.Parent()
deps []ids.ID
)
if parent, err := t.getBlock(ctx, parentID); err != nil || !(t.isDecided(parent) || t.Consensus.Processing(parentID)) {
// We know that shouldIssueBlock(blk) is true. This means that parent is
// either the last accepted block or is not decided.
var deps []ids.ID
if parentID := blk.Parent(); !t.canIssueChildOn(parentID) {
t.Ctx.Log.Verbo("block waiting for parent to be issued",
zap.Stringer("blkID", blkID),
zap.Stringer("parentID", parentID),
Expand Down

0 comments on commit c587d91

Please sign in to comment.