File tree 3 files changed +5
-4
lines changed
3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ func main() {
40
40
dbName := flag .String ("dbName" , "" , "Database name" )
41
41
42
42
codaEndpoint := flag .String ("coda" , "localhost:3085/graphql" , "CODA node graphql endpoint" )
43
+ startupLookback := flag .Int ("startupLookback" , 1000 , "Check the last x blocks immediately after startup" )
43
44
44
45
flag .Parse ()
45
46
@@ -65,7 +66,7 @@ func main() {
65
66
db .DB = dbConn
66
67
defer db .DB .Close ()
67
68
68
- indexer .Start (* codaEndpoint )
69
+ indexer .Start (* codaEndpoint , * startupLookback )
69
70
70
71
util .WaitForCtrlC ()
71
72
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ import (
29
29
var logger = logrus .New ().WithField ("module" , "indexer" )
30
30
31
31
// Start starts the indexing process
32
- func Start (rpcEndpoint string ) {
32
+ func Start (rpcEndpoint string , startupLookback int ) {
33
33
client := rpc .NewCodaClient (rpcEndpoint )
34
34
35
35
newBlockChan := make (chan string )
@@ -42,7 +42,7 @@ func Start(rpcEndpoint string) {
42
42
43
43
go updateStatistics (time .Hour )
44
44
45
- checkBlocks (client , 1000 )
45
+ checkBlocks (client , startupLookback )
46
46
}
47
47
48
48
func updateStatistics (intv time.Duration ) {
Original file line number Diff line number Diff line change 8
8
< div class ="mb-3 ">
9
9
< div class ="d-md-flex py-2 justify-content-md-between ">
10
10
< h1 class ="h4 mb-1 mb-md-0 ">
11
- < span class ="ml-1 mr-1 "> < i class ="fas fa-cube mr-2 "> </ i > Block at Slot {{.Slot}}</ span >
11
+ < span class ="ml-1 mr-1 "> < i class ="fas fa-cube mr-2 "> </ i > Block at Slot {{.Slot}} of Epoch {{.Epoch}} </ span >
12
12
</ h1 >
13
13
< nav aria-label ="breadcrumb ">
14
14
< ol class ="breadcrumb font-size-1 mb-0 " style ="padding:0; background-color:transparent; ">
You can’t perform that action at this time.
0 commit comments