aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/block_processor.go5
-rw-r--r--core/chain_makers.go6
-rw-r--r--core/types/block.go5
3 files changed, 9 insertions, 7 deletions
diff --git a/core/block_processor.go b/core/block_processor.go
index 17256fe9c..f4a3cb8e3 100644
--- a/core/block_processor.go
+++ b/core/block_processor.go
@@ -7,7 +7,6 @@ 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"
@@ -46,11 +45,11 @@ type BlockProcessor struct {
eventMux *event.TypeMux
}
-func NewBlockProcessor(db ethutil.Database, txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor {
+func NewBlockProcessor(db ethutil.Database, pow pow.PoW, txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor {
sm := &BlockProcessor{
db: db,
mem: make(map[string]*big.Int),
- Pow: ethash.New(chainManager),
+ Pow: pow,
bc: chainManager,
eventMux: eventMux,
txpool: txpool,
diff --git a/core/chain_makers.go b/core/chain_makers.go
index 2c36b892e..7afdfde0d 100644
--- a/core/chain_makers.go
+++ b/core/chain_makers.go
@@ -2,12 +2,13 @@ package core
import (
"fmt"
+ "math/big"
+
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethutil"
"github.com/ethereum/go-ethereum/event"
"github.com/ethereum/go-ethereum/pow"
"github.com/ethereum/go-ethereum/state"
- "math/big"
)
// So we can generate blocks easily
@@ -119,8 +120,7 @@ func newChainManager(block *types.Block, eventMux *event.TypeMux, db ethutil.Dat
// block processor with fake pow
func newBlockProcessor(db ethutil.Database, txpool *TxPool, cman *ChainManager, eventMux *event.TypeMux) *BlockProcessor {
- bman := NewBlockProcessor(db, txpool, newChainManager(nil, eventMux, db), eventMux)
- bman.Pow = FakePow{}
+ bman := NewBlockProcessor(db, FakePow{}, txpool, newChainManager(nil, eventMux, db), eventMux)
return bman
}
diff --git a/core/types/block.go b/core/types/block.go
index a37038f73..673c72003 100644
--- a/core/types/block.go
+++ b/core/types/block.go
@@ -268,7 +268,10 @@ func (self *Header) String() string {
Time: %v
Extra: %v
Nonce: %x
-`, self.ParentHash, self.UncleHash, self.Coinbase, self.Root, self.TxHash, self.ReceiptHash, self.Bloom, self.Difficulty, self.Number, self.GasLimit, self.GasUsed, self.Time, self.Extra, self.Nonce)
+ MixDigest: %x
+ SeedHash: %x
+
+`, self.ParentHash, self.UncleHash, self.Coinbase, self.Root, self.TxHash, self.ReceiptHash, self.Bloom, self.Difficulty, self.Number, self.GasLimit, self.GasUsed, self.Time, self.Extra, self.Nonce, self.MixDigest, self.SeedHash)
}
type Blocks []*Block