Skip to content

Commit

Permalink
use heap.Remove
Browse files Browse the repository at this point in the history
  • Loading branch information
EasterTheBunny committed Dec 11, 2024
1 parent 63e3f23 commit b0c2f0c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions pkg/solana/logpoller/loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func (p *orderedParser) sendReadySlots() error {
}

for count, idx := range rmvIdx {
p.blocks.Delete(idx - count)
heap.Remove(p.blocks, idx-count)
}

return nil
Expand Down Expand Up @@ -505,8 +505,3 @@ func (h *blockHeap) Pop() any {

return x
}

func (h *blockHeap) Delete(idx int) {
old := *h
*h = slices.Delete(old, idx, idx+1)
}

0 comments on commit b0c2f0c

Please sign in to comment.