From b0c2f0c1a9063f091ad4e2b321ba53796120b69e Mon Sep 17 00:00:00 2001 From: Awbrey Hughlett Date: Wed, 11 Dec 2024 12:05:53 -0600 Subject: [PATCH] use heap.Remove --- pkg/solana/logpoller/loader.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/pkg/solana/logpoller/loader.go b/pkg/solana/logpoller/loader.go index 8729a4372..e717002b9 100644 --- a/pkg/solana/logpoller/loader.go +++ b/pkg/solana/logpoller/loader.go @@ -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 @@ -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) -}