mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-18 16:44:12 +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/common/length"
|
||||||
"github.com/ledgerwatch/erigon-lib/kv"
|
"github.com/ledgerwatch/erigon-lib/kv"
|
||||||
"github.com/ledgerwatch/log/v3"
|
"github.com/ledgerwatch/log/v3"
|
||||||
|
"golang.org/x/exp/maps"
|
||||||
|
|
||||||
"github.com/ledgerwatch/erigon/core/rawdb"
|
"github.com/ledgerwatch/erigon/core/rawdb"
|
||||||
"github.com/ledgerwatch/erigon/core/types"
|
"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.delivered.Clear()
|
||||||
bd.deliveredCount = 0
|
bd.deliveredCount = 0
|
||||||
bd.wastedCount = 0
|
bd.wastedCount = 0
|
||||||
bd.deliveriesH = make(map[uint64]*types.Header)
|
maps.Clear(bd.deliveriesH)
|
||||||
bd.requests = make(map[uint64]*BodyRequest)
|
maps.Clear(bd.requests)
|
||||||
bd.peerMap = make(map[[64]byte]int)
|
maps.Clear(bd.peerMap)
|
||||||
|
//bd.ClearBodyCache()
|
||||||
headHeight = bodyProgress
|
headHeight = bodyProgress
|
||||||
headHash, err = rawdb.ReadCanonicalHash(db, headHeight)
|
headHash, err = rawdb.ReadCanonicalHash(db, headHeight)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -188,7 +188,7 @@ func TraceTx(
|
|||||||
}
|
}
|
||||||
|
|
||||||
var result *core.ExecutionResult
|
var result *core.ExecutionResult
|
||||||
if config.BorTx != nil && *config.BorTx {
|
if config != nil && config.BorTx != nil && *config.BorTx {
|
||||||
callmsg := prepareCallMessage(message)
|
callmsg := prepareCallMessage(message)
|
||||||
result, err = statefull.ApplyBorMessage(*vmenv, callmsg)
|
result, err = statefull.ApplyBorMessage(*vmenv, callmsg)
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user