aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVitalik Buterin <v@buterin.com>2015-05-14 17:02:15 +0800
committerVitalik Buterin <v@buterin.com>2015-05-14 17:02:15 +0800
commitbdec8c3e41acf56f1cb7914b216c1d12b15b657b (patch)
tree74181c933cb7f6759cb8da0fbddbf0230fc8066f
parentfca3333f7f586832daba9e70a7ecd711baa163a9 (diff)
downloaddexon-bdec8c3e41acf56f1cb7914b216c1d12b15b657b.tar.gz
dexon-bdec8c3e41acf56f1cb7914b216c1d12b15b657b.tar.zst
dexon-bdec8c3e41acf56f1cb7914b216c1d12b15b657b.zip
Combined two loops
-rw-r--r--miner/worker.go4
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