eth: fix targetView==nil case

This commit is contained in:
zsfelfoldi 2026-02-10 13:19:44 +01:00
parent bbb1ab8d16
commit fd36eb67ad

View file

@ -495,6 +495,9 @@ func (s *Ethereum) updateFilterMapsHeads() {
if head == nil || newHead.Hash() != head.Hash() { if head == nil || newHead.Hash() != head.Hash() {
head = newHead head = newHead
chainView := s.newChainView(head) chainView := s.newChainView(head)
if chainView == nil {
return
}
historyCutoff, _ := s.blockchain.HistoryPruningCutoff() historyCutoff, _ := s.blockchain.HistoryPruningCutoff()
var finalBlock uint64 var finalBlock uint64
if fb := s.blockchain.CurrentFinalBlock(); fb != nil { if fb := s.blockchain.CurrentFinalBlock(); fb != nil {