mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-18 08:38:46 +00:00
Fix nil pointer panic in tracing (#7000)
Co-authored-by: Alexey Sharp <alexeysharp@Alexeys-iMac.local>
This commit is contained in:
parent
599fc24aed
commit
d865b6405c
@ -12,6 +12,7 @@ import (
|
||||
"github.com/ledgerwatch/erigon-lib/common/length"
|
||||
"github.com/ledgerwatch/erigon-lib/kv"
|
||||
"github.com/ledgerwatch/log/v3"
|
||||
"golang.org/x/exp/maps"
|
||||
|
||||
"github.com/ledgerwatch/erigon/core/rawdb"
|
||||
"github.com/ledgerwatch/erigon/core/types"
|
||||
@ -40,9 +41,10 @@ func (bd *BodyDownload) UpdateFromDb(db kv.Tx) (headHeight, headTime uint64, hea
|
||||
bd.delivered.Clear()
|
||||
bd.deliveredCount = 0
|
||||
bd.wastedCount = 0
|
||||
bd.deliveriesH = make(map[uint64]*types.Header)
|
||||
bd.requests = make(map[uint64]*BodyRequest)
|
||||
bd.peerMap = make(map[[64]byte]int)
|
||||
maps.Clear(bd.deliveriesH)
|
||||
maps.Clear(bd.requests)
|
||||
maps.Clear(bd.peerMap)
|
||||
//bd.ClearBodyCache()
|
||||
headHeight = bodyProgress
|
||||
headHash, err = rawdb.ReadCanonicalHash(db, headHeight)
|
||||
if err != nil {
|
||||
|
@ -188,7 +188,7 @@ func TraceTx(
|
||||
}
|
||||
|
||||
var result *core.ExecutionResult
|
||||
if config.BorTx != nil && *config.BorTx {
|
||||
if config != nil && config.BorTx != nil && *config.BorTx {
|
||||
callmsg := prepareCallMessage(message)
|
||||
result, err = statefull.ApplyBorMessage(*vmenv, callmsg)
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user