diff options
author | Matthew Wampler-Doty <matthew.wampler.doty@gmail.com> | 2015-03-01 03:58:37 +0800 |
---|---|---|
committer | Matthew Wampler-Doty <matthew.wampler.doty@gmail.com> | 2015-03-03 11:29:34 +0800 |
commit | de9f79133faa1ff5dcd16fb4fd13d06b7799ded9 (patch) | |
tree | fcc9001d6b681ccdd1b3bbe516e3611e808341d7 /core/block_processor.go | |
parent | 080823bdeebbab2bcffdaefad703896700ed2c30 (diff) | |
download | go-tangerine-de9f79133faa1ff5dcd16fb4fd13d06b7799ded9.tar go-tangerine-de9f79133faa1ff5dcd16fb4fd13d06b7799ded9.tar.gz go-tangerine-de9f79133faa1ff5dcd16fb4fd13d06b7799ded9.tar.bz2 go-tangerine-de9f79133faa1ff5dcd16fb4fd13d06b7799ded9.tar.lz go-tangerine-de9f79133faa1ff5dcd16fb4fd13d06b7799ded9.tar.xz go-tangerine-de9f79133faa1ff5dcd16fb4fd13d06b7799ded9.tar.zst go-tangerine-de9f79133faa1ff5dcd16fb4fd13d06b7799ded9.zip |
Introducing ethash
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 aef53c940..3123511f9 100644 --- a/core/block_processor.go +++ b/core/block_processor.go @@ -7,12 +7,12 @@ import ( "sync" "time" + "github.com/ethereum/ethash" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethutil" "github.com/ethereum/go-ethereum/event" "github.com/ethereum/go-ethereum/logger" "github.com/ethereum/go-ethereum/pow" - "github.com/ethereum/go-ethereum/pow/ezp" "github.com/ethereum/go-ethereum/state" "gopkg.in/fatih/set.v0" ) @@ -50,7 +50,7 @@ func NewBlockProcessor(db ethutil.Database, txpool *TxPool, chainManager *ChainM sm := &BlockProcessor{ db: db, mem: make(map[string]*big.Int), - Pow: ezp.New(), + Pow: ethash.New(chainManager), bc: chainManager, eventMux: eventMux, txpool: txpool, @@ -255,6 +255,7 @@ func (sm *BlockProcessor) ValidateBlock(block, parent *types.Block) error { return fmt.Errorf("GasLimit check failed for block %v, %v", block.Header().GasLimit, expl) } + // There can be at most one uncle if len(block.Uncles()) > 1 { return ValidationError("Block can only contain one uncle (contained %v)", len(block.Uncles())) } |