diff options
author | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-09-16 22:50:14 +0800 |
---|---|---|
committer | Jeffrey Wilcke <jeffrey@ethereum.org> | 2015-09-16 22:50:14 +0800 |
commit | 985b5f29ed18eac6a36d569edbde6dcfde8d1ab0 (patch) | |
tree | a5e098c99993d7abe7e012f147e98a1c68bb046c /core/block_processor.go | |
parent | 1cc2f080417ba77ecb66a058727e00f6644c5e7b (diff) | |
parent | b25258996059439df82687cc653ed14a5a9edce1 (diff) | |
download | go-tangerine-985b5f29ed18eac6a36d569edbde6dcfde8d1ab0.tar go-tangerine-985b5f29ed18eac6a36d569edbde6dcfde8d1ab0.tar.gz go-tangerine-985b5f29ed18eac6a36d569edbde6dcfde8d1ab0.tar.bz2 go-tangerine-985b5f29ed18eac6a36d569edbde6dcfde8d1ab0.tar.lz go-tangerine-985b5f29ed18eac6a36d569edbde6dcfde8d1ab0.tar.xz go-tangerine-985b5f29ed18eac6a36d569edbde6dcfde8d1ab0.tar.zst go-tangerine-985b5f29ed18eac6a36d569edbde6dcfde8d1ab0.zip |
Merge pull request #1801 from fjl/ethdb
all: move common.Database to ethdb and add NewBatch
Diffstat (limited to 'core/block_processor.go')
-rw-r--r-- | core/block_processor.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/core/block_processor.go b/core/block_processor.go index 1238fda7b..1d3bc6656 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -26,6 +26,7 @@ import ( "github.com/ethereum/go-ethereum/core/state" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/crypto" + "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/logger/glog" @@ -41,7 +42,7 @@ const ( ) type BlockProcessor struct { - chainDb common.Database + chainDb ethdb.Database // Mutex for locking the block processor. Blocks can only be handled one at a time mutex sync.Mutex // Canonical block chain @@ -68,7 +69,7 @@ type GasPool interface { SubGas(gas, price *big.Int) error } -func NewBlockProcessor(db common.Database, pow pow.PoW, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor { +func NewBlockProcessor(db ethdb.Database, pow pow.PoW, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor { sm := &BlockProcessor{ chainDb: db, mem: make(map[string]*big.Int), |