Skip to content

Commit

Permalink
Apply Eclesio's suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
qdm12 committed Jan 10, 2023
1 parent 92ce9a0 commit 753189d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/trie/node/branch_encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,10 @@ func encodeChildrenOpportunisticParallel(children []*Node, buffer io.Writer) (er
break
}

delete(indexToBuffer, currentIndex)

nilChildNode := resultBuffer == nil
if nilChildNode {
delete(indexToBuffer, currentIndex)
currentIndex++
continue
}
Expand All @@ -108,7 +109,6 @@ func encodeChildrenOpportunisticParallel(children []*Node, buffer io.Writer) (er
}
}

delete(indexToBuffer, currentIndex)
currentIndex++
}
}
Expand Down

0 comments on commit 753189d

Please sign in to comment.