mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-22 19:50:36 +00:00
Use the passed VMConfig (#1141)
* Use the passed VMConfig * Explicitly pass the vmConfig into runBlock
This commit is contained in:
parent
f33ddec7ab
commit
252863fedf
@ -76,7 +76,7 @@ func CheckChangeSets(genesis *core.Genesis, blockNum uint64, chaindata string, h
|
||||
blockWriter = csw
|
||||
}
|
||||
|
||||
receipts, err1 := runBlock(intraBlockState, noOpWriter, blockWriter, chainConfig, bc, block)
|
||||
receipts, err1 := runBlock(intraBlockState, noOpWriter, blockWriter, chainConfig, bc, block, vmConfig)
|
||||
if err1 != nil {
|
||||
return err1
|
||||
}
|
||||
|
@ -40,10 +40,9 @@ var chartColors = []drawing.Color{
|
||||
}
|
||||
|
||||
func runBlock(ibs *state.IntraBlockState, txnWriter state.StateWriter, blockWriter state.StateWriter,
|
||||
chainConfig *params.ChainConfig, bcb core.ChainContext, block *types.Block,
|
||||
) (types.Receipts, error) {
|
||||
chainConfig *params.ChainConfig, bcb core.ChainContext, block *types.Block, vmConfig vm.Config) (types.Receipts, error) {
|
||||
header := block.Header()
|
||||
vmConfig := vm.Config{TraceJumpDest: true}
|
||||
vmConfig.TraceJumpDest = true
|
||||
engine := ethash.NewFullFaker()
|
||||
gp := new(core.GasPool).AddGas(block.GasLimit())
|
||||
usedGas := new(uint64)
|
||||
@ -399,7 +398,7 @@ func Stateless(
|
||||
ibs := state.New(s)
|
||||
ibs.SetTrace(trace)
|
||||
s.SetBlockNr(blockNum)
|
||||
if _, err = runBlock(ibs, s, s, chainConfig, blockProvider, block); err != nil {
|
||||
if _, err = runBlock(ibs, s, s, chainConfig, blockProvider, block, vmConfig); err != nil {
|
||||
fmt.Printf("Error running block %d through stateless2: %v\n", blockNum, err)
|
||||
finalRootFail = true
|
||||
} else if !binary {
|
||||
|
Loading…
Reference in New Issue
Block a user