diff options
author | Péter Szilágyi <peterke@gmail.com> | 2018-09-24 20:57:49 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-03-06 19:35:03 +0800 |
commit | 054412e33528e53f6deae940c870217b614707b9 (patch) | |
tree | 7ffc999bb39384e1bfa8c71d80923879fc2e866b /eth/tracers | |
parent | 15eee47ebf878b4eff3c2359b9eaa57bba397448 (diff) | |
download | go-tangerine-054412e33528e53f6deae940c870217b614707b9.tar go-tangerine-054412e33528e53f6deae940c870217b614707b9.tar.gz go-tangerine-054412e33528e53f6deae940c870217b614707b9.tar.bz2 go-tangerine-054412e33528e53f6deae940c870217b614707b9.tar.lz go-tangerine-054412e33528e53f6deae940c870217b614707b9.tar.xz go-tangerine-054412e33528e53f6deae940c870217b614707b9.tar.zst go-tangerine-054412e33528e53f6deae940c870217b614707b9.zip |
all: clean up and proerly abstract database access
Diffstat (limited to 'eth/tracers')
-rw-r--r-- | eth/tracers/tracers_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/eth/tracers/tracers_test.go b/eth/tracers/tracers_test.go index 8b12b5b65..69eb80a5c 100644 --- a/eth/tracers/tracers_test.go +++ b/eth/tracers/tracers_test.go @@ -31,10 +31,10 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/core" + "github.com/ethereum/go-ethereum/core/rawdb" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/core/vm" "github.com/ethereum/go-ethereum/crypto" - "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/params" "github.com/ethereum/go-ethereum/rlp" "github.com/ethereum/go-ethereum/tests" @@ -155,6 +155,7 @@ func TestPrestateTracerCreate2(t *testing.T) { GasPrice: big.NewInt(1), } alloc := core.GenesisAlloc{} + // The code pushes 'deadbeef' into memory, then the other params, and calls CREATE2, then returns // the address alloc[common.HexToAddress("0x00000000000000000000000000000000deadbeef")] = core.GenesisAccount{ @@ -167,7 +168,8 @@ func TestPrestateTracerCreate2(t *testing.T) { Code: []byte{}, Balance: big.NewInt(500000000000000), } - statedb := tests.MakePreState(ethdb.NewMemDatabase(), alloc) + statedb := tests.MakePreState(rawdb.NewMemoryDatabase(), alloc) + // Create the tracer, the EVM environment and run it tracer, err := New("prestateTracer") if err != nil { @@ -240,7 +242,7 @@ func TestCallTracer(t *testing.T) { GasLimit: uint64(test.Context.GasLimit), GasPrice: tx.GasPrice(), } - statedb := tests.MakePreState(ethdb.NewMemDatabase(), test.Genesis.Alloc) + statedb := tests.MakePreState(rawdb.NewMemoryDatabase(), test.Genesis.Alloc) // Create the tracer, the EVM environment and run it tracer, err := New("callTracer") |