Skip to content

Commit

Permalink
Changed the order of the Block print
Browse files Browse the repository at this point in the history
  • Loading branch information
gameofpointers committed Sep 15, 2023
1 parent de28791 commit 1f8c8b6
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,14 @@ func (m *Miner) resultLoop() {
log.Println("Mined block had invalid order: err=", err)
return
}
switch order {
case common.PRIME_CTX:
log.Println(color.Ize(color.Red, "PRIME block : "), header.NumberArray(), header.Hash())
case common.REGION_CTX:
log.Println(color.Ize(color.Yellow, "REGION block: "), header.NumberArray(), header.Hash())
case common.ZONE_CTX:
log.Println(color.Ize(color.Blue, "ZONE block : "), header.NumberArray(), header.Hash())
}
if !m.config.Proxy {
for i := common.HierarchyDepth - 1; i >= order; i-- {
err := m.sendMinedHeaderNodes(i, header)
Expand All @@ -376,14 +384,6 @@ func (m *Miner) resultLoop() {
// Proxy miner only needs to send to the proxy (stored at zone context).
go m.sendMinedHeaderProxy(header)
}
switch order {
case common.PRIME_CTX:
log.Println(color.Ize(color.Red, "PRIME block : "), header.NumberArray(), header.Hash())
case common.REGION_CTX:
log.Println(color.Ize(color.Yellow, "REGION block: "), header.NumberArray(), header.Hash())
case common.ZONE_CTX:
log.Println(color.Ize(color.Blue, "ZONE block : "), header.NumberArray(), header.Hash())
}
}
}
}
Expand Down

0 comments on commit 1f8c8b6

Please sign in to comment.