diff --git a/cmd/sentry/sentry/sentry_grpc_server.go b/cmd/sentry/sentry/sentry_grpc_server.go index 4dea3afde..5623cec53 100644 --- a/cmd/sentry/sentry/sentry_grpc_server.go +++ b/cmd/sentry/sentry/sentry_grpc_server.go @@ -105,6 +105,7 @@ func (bp *PeersByMinBlock) Pop() interface{} { old := *bp n := len(old) x := old[n-1] + old[n-1] = PeerRef{} *bp = old[0 : n-1] return x } diff --git a/core/types/transaction.go b/core/types/transaction.go index 2b025b84b..4a15716f8 100644 --- a/core/types/transaction.go +++ b/core/types/transaction.go @@ -319,6 +319,7 @@ func (s *TxByPriceAndTime) Pop() interface{} { old := *s n := len(old) x := old[n-1] + old[n-1] = nil *s = old[0 : n-1] return x } diff --git a/eth/gasprice/gasprice.go b/eth/gasprice/gasprice.go index f6e9e3884..e34f60e43 100644 --- a/eth/gasprice/gasprice.go +++ b/eth/gasprice/gasprice.go @@ -211,6 +211,7 @@ func (t *transactionsByGasPrice) Pop() interface{} { old := t.txs n := len(old) x := old[n-1] + old[n-1] = nil t.txs = old[0 : n-1] return x } @@ -289,6 +290,7 @@ func (s *sortingHeap) Pop() interface{} { old := *s n := len(old) x := old[n-1] + old[n-1] = nil *s = old[0 : n-1] return x } diff --git a/p2p/util.go b/p2p/util.go index bd30d65d6..845107e2d 100644 --- a/p2p/util.go +++ b/p2p/util.go @@ -70,6 +70,7 @@ func (h *expHeap) Pop() interface{} { old := *h n := len(old) x := old[n-1] + old[n-1] = expItem{} *h = old[0 : n-1] return x } diff --git a/turbo/stages/headerdownload/header_data_struct.go b/turbo/stages/headerdownload/header_data_struct.go index 217029d29..589c4beda 100644 --- a/turbo/stages/headerdownload/header_data_struct.go +++ b/turbo/stages/headerdownload/header_data_struct.go @@ -87,6 +87,7 @@ func (lq *LinkQueue) Pop() interface{} { old := *lq n := len(old) x := old[n-1] + old[n-1] = nil x.idx = -1 x.queueId = NoQueue *lq = old[0 : n-1] @@ -152,6 +153,7 @@ func (aq *AnchorQueue) Pop() interface{} { old := *aq n := len(old) x := old[n-1] + old[n-1] = nil *aq = old[0 : n-1] x.idx = -1 return x @@ -243,6 +245,7 @@ func (iq *InsertQueue) Pop() interface{} { old := *iq n := len(old) x := old[n-1] + old[n-1] = nil *iq = old[0 : n-1] x.idx = -1 x.queueId = NoQueue