good morning!!!!

Skip to content
Snippets Groups Projects
Commit bdec8c3e authored by Vitalik Buterin's avatar Vitalik Buterin
Browse files

Combined two loops

parent fca3333f
No related branches found
No related tags found
No related merge requests found
...@@ -266,14 +266,12 @@ func (self *worker) makeCurrent() { ...@@ -266,14 +266,12 @@ func (self *worker) makeCurrent() {
block.Header().Extra = self.extra block.Header().Extra = self.extra
current := env(block, self.eth) 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 _, ancestor := range self.chain.GetAncestors(block, 7) {
for _, uncle := range ancestor.Uncles() { for _, uncle := range ancestor.Uncles() {
current.family.Add(uncle.Hash()) current.family.Add(uncle.Hash())
} }
current.family.Add(ancestor.Hash()) current.family.Add(ancestor.Hash())
current.ancestors.Add(ancestor.Hash())
} }
accounts, _ := self.eth.AccountManager().Accounts() accounts, _ := self.eth.AccountManager().Accounts()
// Keep track of transactions which return errors so they can be removed // Keep track of transactions which return errors so they can be removed
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment