diff --git a/core/genesis.go b/core/genesis.go index a3d701f9f..9c82a28c8 100644 --- a/core/genesis.go +++ b/core/genesis.go @@ -31,7 +31,6 @@ func GenesisBlock(db ethutil.Database) *types.Block { genesis.Header().GasLimit = GenesisGasLimit genesis.Header().GasUsed = ethutil.Big0 genesis.Header().Time = 0 - genesis.Header().SeedHash = make([]byte, 32) genesis.Header().MixDigest = make([]byte, 32) genesis.Td = ethutil.Big0 diff --git a/core/types/block.go b/core/types/block.go index 31c7c2b87..50973c804 100644 --- a/core/types/block.go +++ b/core/types/block.go @@ -40,8 +40,6 @@ type Header struct { Time uint64 // Extra data Extra string - // SeedHash used for light client verification - SeedHash ethutil.Bytes // Mix digest for quick checking to prevent DOS MixDigest ethutil.Bytes // Nonce @@ -63,7 +61,6 @@ func (self *Header) rlpData(withNonce bool) []interface{} { self.GasUsed, self.Time, self.Extra, - self.SeedHash, } if withNonce { fields = append(fields, self.MixDigest, self.Nonce) @@ -202,7 +199,6 @@ func (self *Block) RlpDataForStorage() interface{} { func (self *Block) Number() *big.Int { return self.header.Number } func (self *Block) NumberU64() uint64 { return self.header.Number.Uint64() } func (self *Block) MixDigest() []byte { return self.header.MixDigest } -func (self *Block) SeedHash() []byte { return self.header.SeedHash } func (self *Block) Nonce() uint64 { return binary.BigEndian.Uint64(self.header.Nonce) } @@ -281,10 +277,9 @@ func (self *Header) String() string { GasUsed: %v Time: %v Extra: %v - SeedHash: %x MixDigest: %x 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.SeedHash, self.MixDigest, self.Nonce) + 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.MixDigest, self.Nonce) } type Blocks []*Block diff --git a/miner/worker.go b/miner/worker.go index 7ef113fd4..5c4a13698 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -7,7 +7,6 @@ import ( "sync" "time" - "github.com/ethereum/ethash" "github.com/ethereum/go-ethereum/core" "github.com/ethereum/go-ethereum/core/types" "github.com/ethereum/go-ethereum/ethutil" @@ -154,7 +153,6 @@ func (self *worker) wait() { if block.Number().Uint64() == work.Number && block.Nonce() == 0 { self.current.block.SetNonce(work.Nonce) self.current.block.Header().MixDigest = work.MixDigest - self.current.block.Header().SeedHash = work.SeedHash jsonlogger.LogJson(&logger.EthMinerNewBlock{ BlockHash: ethutil.Bytes2Hex(block.Hash()), @@ -191,8 +189,6 @@ func (self *worker) commitNewWork() { defer self.mu.Unlock() block := self.chain.NewBlock(self.coinbase) - seednum := ethash.GetSeedBlockNum(block.NumberU64()) - block.Header().SeedHash = self.chain.GetBlockByNumber(seednum).SeedHash() self.current = env(block, self.eth) parent := self.chain.GetBlock(self.current.block.ParentHash()) diff --git a/pow/block.go b/pow/block.go index 3bc63978b..136e4bf8d 100644 --- a/pow/block.go +++ b/pow/block.go @@ -11,7 +11,6 @@ type Block interface { HashNoNonce() []byte Nonce() uint64 MixDigest() []byte - SeedHash() []byte NumberU64() uint64 }