diff options
author | Vitalik Buterin <v@buterin.com> | 2015-05-14 17:02:15 +0800 |
---|---|---|
committer | Vitalik Buterin <v@buterin.com> | 2015-05-14 17:02:15 +0800 |
commit | bdec8c3e41acf56f1cb7914b216c1d12b15b657b (patch) | |
tree | 74181c933cb7f6759cb8da0fbddbf0230fc8066f | |
parent | fca3333f7f586832daba9e70a7ecd711baa163a9 (diff) | |
download | dexon-bdec8c3e41acf56f1cb7914b216c1d12b15b657b.tar.gz dexon-bdec8c3e41acf56f1cb7914b216c1d12b15b657b.tar.zst dexon-bdec8c3e41acf56f1cb7914b216c1d12b15b657b.zip |
Combined two loops
-rw-r--r-- | miner/worker.go | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/miner/worker.go b/miner/worker.go index e714b5063..c70ded434 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -267,13 +267,11 @@ func (self *worker) makeCurrent() { current := env(block, self.eth) for _, ancestor := range self.chain.GetAncestors(block, 7) { - current.ancestors.Add(ancestor.Hash()) - } - for _, ancestor := range self.chain.GetAncestors(block, 7) { for _, uncle := range ancestor.Uncles() { current.family.Add(uncle.Hash()) } current.family.Add(ancestor.Hash()) + current.ancestors.Add(ancestor.Hash()) } accounts, _ := self.eth.AccountManager().Accounts() // Keep track of transactions which return errors so they can be removed |