mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-26 14:46:42 +00:00
fixed errors in integration tests
This commit is contained in:
parent
e46ca3873f
commit
6204e2d10e
2 changed files with 9 additions and 2 deletions
|
|
@ -5,6 +5,7 @@ import (
|
||||||
|
|
||||||
common "github.com/ethereum/go-ethereum/common"
|
common "github.com/ethereum/go-ethereum/common"
|
||||||
core "github.com/ethereum/go-ethereum/core"
|
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/rawdb"
|
||||||
"github.com/ethereum/go-ethereum/core/state"
|
"github.com/ethereum/go-ethereum/core/state"
|
||||||
types "github.com/ethereum/go-ethereum/core/types"
|
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) {
|
func (b *TestBackend) Pending() (*types.Block, types.Receipts, *state.StateDB) {
|
||||||
panic("not implemented")
|
panic("not implemented")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (b *TestBackend) NewMatcherBackend() filtermaps.MatcherBackend {
|
||||||
|
panic("implement me")
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -230,7 +230,7 @@ func buildNextBlock(t *testing.T, _bor consensus.Engine, chain *core.BlockChain,
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write state changes to db
|
// 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 {
|
if err != nil {
|
||||||
panic(fmt.Sprintf("state write error: %v", err))
|
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))
|
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 {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue