forked from pokt-network/relay_counter
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain.go
28 lines (26 loc) · 902 Bytes
/
main.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package main
import (
"log"
)
func main() {
log.Println("Attempting to read Config file:")
c := getConfig()
log.Println("Config File Processed:")
log.Println(c)
log.Println("Testing Pocket Endpoint")
if err := testEndpoint(c.Endpoint); err != nil {
log.Fatal(err)
}
log.Println("Converting Timeline To Block Heights")
timelineReport, err := ConvertTimelineToHeights(c)
if err != nil {
log.Fatal(err)
}
log.Println("Beginning to retrieve the transactions and claims from the blockchain")
blockTxsMap, claimsMap, startSupply, endSupply := GetChainData(timelineReport.MinHeight, timelineReport.MaxHeight, c)
log.Println("Creating a report from the blockchain data")
result := ProcessChainData(blockTxsMap, claimsMap, startSupply, endSupply, timelineReport)
log.Println("Writing the result to a report file under /result/<date>.json")
writeResultFile(result)
log.Println("Done")
}