From bdec8c3e41acf56f1cb7914b216c1d12b15b657b Mon Sep 17 00:00:00 2001 From: Vitalik Buterin Date: Thu, 14 May 2015 05:02:15 -0400 Subject: Combined two loops --- miner/worker.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/miner/worker.go b/miner/worker.go index e714b5063..c70ded434 100644 --- a/miner/worker.go +++ b/miner/worker.go @@ -266,14 +266,12 @@ func (self *worker) makeCurrent() { block.Header().Extra = self.extra 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 -- cgit v1.2.3