Basic structure miner

This commit is contained in:
obscuren
2015-02-09 16:20:34 +01:00
parent b22f0f2ef5
commit da2fae0e43
9 changed files with 198 additions and 293 deletions

View File

@ -7,7 +7,6 @@ import (
"sync"
"time"
"github.com/ethereum/c-ethash/go-ethash"
"github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/ethutil"
@ -15,7 +14,7 @@ import (
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/p2p"
"github.com/ethereum/go-ethereum/pow"
_ "github.com/ethereum/go-ethereum/pow/ezp"
"github.com/ethereum/go-ethereum/pow/ezp"
"github.com/ethereum/go-ethereum/state"
"gopkg.in/fatih/set.v0"
)
@ -65,9 +64,10 @@ type BlockProcessor struct {
func NewBlockProcessor(db ethutil.Database, txpool *TxPool, chainManager *ChainManager, eventMux *event.TypeMux) *BlockProcessor {
sm := &BlockProcessor{
db: db,
mem: make(map[string]*big.Int),
Pow: &ethash.Ethash{},
db: db,
mem: make(map[string]*big.Int),
//Pow: &ethash.Ethash{},
Pow: ezp.New(),
bc: chainManager,
eventMux: eventMux,
txpool: txpool,