diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-16 18:27:38 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-16 18:27:38 +0800 |
commit | b5234413611ce5984292f85a01de1f56c045b490 (patch) | |
tree | e6e0c6f7fe8358a2dc63cdea11ac66b4f59397f5 /core/block_processor.go | |
parent | 0b8f66ed9ef177dc72442dd7ba337c6733e30344 (diff) | |
download | go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.gz go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.bz2 go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.lz go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.xz go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.tar.zst go-tangerine-b5234413611ce5984292f85a01de1f56c045b490.zip |
Moved ethutil => common
Diffstat (limited to 'core/block_processor.go')
-rw-r--r-- | core/block_processor.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/block_processor.go b/core/block_processor.go index f421c3539..f67d6d006 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -8,7 +8,7 @@ import ( "time" "github.com/ethereum/go-ethereum/core/types" - "github.com/ethereum/go-ethereum/ethutil" + "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/pow" @@ -24,8 +24,8 @@ type PendingBlockEvent struct { var statelogger = logger.NewLogger("BLOCK") type BlockProcessor struct { - db ethutil.Database - extraDb ethutil.Database + db common.Database + extraDb common.Database // Mutex for locking the block processor. Blocks can only be handled one at a time mutex sync.Mutex // Canonical block chain @@ -47,7 +47,7 @@ type BlockProcessor struct { eventMux *event.TypeMux } -func NewBlockProcessor(db, extra ethutil.Database, pow pow.PoW, txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor { +func NewBlockProcessor(db, extra common.Database, pow pow.PoW, txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor { sm := &BlockProcessor{ db: db, extraDb: extra, @@ -217,7 +217,7 @@ func (sm *BlockProcessor) processWithParent(block, parent *types.Block) (td *big // Commit state objects/accounts to a temporary trie (does not save) // used to calculate the state root. - state.Update(ethutil.Big0) + state.Update(common.Big0) if !bytes.Equal(header.Root, state.Root()) { err = fmt.Errorf("invalid merkle root. received=%x got=%x", header.Root, state.Root()) return @@ -352,7 +352,7 @@ func (sm *BlockProcessor) GetLogs(block *types.Block) (logs state.Logs, err erro return state.Logs(), nil } -func putTx(db ethutil.Database, tx *types.Transaction) { +func putTx(db common.Database, tx *types.Transaction) { rlpEnc, err := rlp.EncodeToBytes(tx) if err != nil { statelogger.Infoln("Failed encoding tx", err) |