mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-25 13:07:17 +00:00
Drop header references from persistent links (#1991)
Co-authored-by: Alex Sharp <alexsharp@Alexs-MacBook-Pro.local>
This commit is contained in:
parent
5655409616
commit
6a19321d82
@ -596,6 +596,7 @@ func (hd *HeaderDownload) InsertHeaders(hf func(header *types.Header, blockHeigh
|
||||
hd.highestInDb = link.blockHeight
|
||||
}
|
||||
link.persisted = true
|
||||
link.header = nil // Drop header reference to free memory, as we won't need it anymore
|
||||
heap.Push(hd.persistedLinkQueue, link)
|
||||
if len(link.next) > 0 {
|
||||
hd.insertList = append(hd.insertList, link.next...)
|
||||
|
Loading…
Reference in New Issue
Block a user