From 1f8c8b68751c37ba5e4208c4a71ebb13a2fa3ead Mon Sep 17 00:00:00 2001 From: gop Date: Fri, 8 Sep 2023 18:31:39 -0500 Subject: [PATCH] Changed the order of the Block print --- main.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/main.go b/main.go index c4aaaee..1e0e53c 100644 --- a/main.go +++ b/main.go @@ -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) @@ -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()) - } } } }