Merge pull request #19021 from karalabe/database-cleanup

all: clean up and properly abstract database accesses
This commit is contained in:
Péter Szilágyi
2019-03-07 10:21:40 +02:00
committed by GitHub
94 changed files with 1573 additions and 1381 deletions

View File

@ -24,10 +24,10 @@ import (
"github.com/ethereum/go-ethereum/common"
"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"
)
@ -400,7 +400,7 @@ func TestClique(t *testing.T) {
copy(genesis.ExtraData[extraVanity+j*common.AddressLength:], signer[:])
}
// Create a pristine blockchain with the genesis injected
db := ethdb.NewMemDatabase()
db := rawdb.NewMemoryDatabase()
genesis.Commit(db)
// Assemble a chain of headers from the cast votes