diff options
author | obscuren <geffobscura@gmail.com> | 2015-04-06 00:57:03 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-04-06 00:59:18 +0800 |
commit | 9c55576c7b415954773c062d404a736741fb9794 (patch) | |
tree | 5c79551e6ad55d88c02fbe3374ebc9738b863f8d /miner/worker.go | |
parent | 3040296beb3a8ca991b738a83df0af7bddde2ac6 (diff) | |
download | go-tangerine-9c55576c7b415954773c062d404a736741fb9794.tar.gz go-tangerine-9c55576c7b415954773c062d404a736741fb9794.tar.zst go-tangerine-9c55576c7b415954773c062d404a736741fb9794.zip |
Block header changed & console miner control
* miner control moved to `admin.miner`
* miner option to set extra data
* block extra now bytes
Diffstat (limited to 'miner/worker.go')
-rw-r--r-- | miner/worker.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/miner/worker.go b/miner/worker.go index 17afa25de..da10cf7cd 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -69,10 +69,12 @@ type worker struct { pow pow.PoW atWork int64 - eth core.Backend - chain *core.ChainManager - proc *core.BlockProcessor + eth core.Backend + chain *core.ChainManager + proc *core.BlockProcessor + coinbase common.Address + extra []byte current *environment @@ -213,6 +215,7 @@ func (self *worker) commitNewWork() { if block.Time() == self.chain.CurrentBlock().Time() { block.Header().Time++ } + block.Header().Extra = self.extra self.current = env(block, self.eth) for _, ancestor := range self.chain.GetAncestors(block, 7) { |