fixed errors in integration tests

This commit is contained in:
Pratik Patil 2025-05-14 17:25:38 +05:30
parent e46ca3873f
commit 6204e2d10e
No known key found for this signature in database
GPG key ID: AFDCA496554874B3
2 changed files with 9 additions and 2 deletions

View file

@ -5,6 +5,7 @@ import (
common "github.com/ethereum/go-ethereum/common"
core "github.com/ethereum/go-ethereum/core"
"github.com/ethereum/go-ethereum/core/filtermaps"
"github.com/ethereum/go-ethereum/core/rawdb"
"github.com/ethereum/go-ethereum/core/state"
types "github.com/ethereum/go-ethereum/core/types"
@ -193,3 +194,7 @@ func (b *TestBackend) GetBody(context.Context, common.Hash, rpc.BlockNumber) (*t
func (b *TestBackend) Pending() (*types.Block, types.Receipts, *state.StateDB) {
panic("not implemented")
}
func (b *TestBackend) NewMatcherBackend() filtermaps.MatcherBackend {
panic("implement me")
}

View file

@ -230,7 +230,7 @@ func buildNextBlock(t *testing.T, _bor consensus.Engine, chain *core.BlockChain,
}
// Write state changes to db
root, err := state.Commit(block.NumberU64(), chain.Config().IsEIP158(b.header.Number))
root, err := state.Commit(block.NumberU64(), chain.Config().IsEIP158(b.header.Number), false)
if err != nil {
panic(fmt.Sprintf("state write error: %v", err))
}
@ -265,7 +265,9 @@ func (b *blockGen) addTxWithChain(bc *core.BlockChain, statedb *state.StateDB, t
statedb.SetTxContext(tx.Hash(), len(b.txs))
receipt, err := core.ApplyTransaction(bc.Config(), bc, &b.header.Coinbase, b.gasPool, statedb, b.header, tx, &b.header.GasUsed, vm.Config{}, nil)
context := core.NewEVMBlockContext(b.header, bc, nil)
evm := vm.NewEVM(context, statedb, bc.Config(), vm.Config{})
receipt, err := core.ApplyTransaction(evm, b.gasPool, statedb, b.header, tx, &b.header.GasUsed, nil)
if err != nil {
panic(err)
}