@@ -13,7 +13,7 @@ import (
13
13
"github.com/benleb/gloomberg/internal"
14
14
"github.com/benleb/gloomberg/internal/collections"
15
15
"github.com/benleb/gloomberg/internal/config"
16
- "github.com/benleb/gloomberg/internal/degendata"
16
+ "github.com/benleb/gloomberg/internal/degendb/ degendata"
17
17
"github.com/benleb/gloomberg/internal/gbl"
18
18
"github.com/benleb/gloomberg/internal/nemo/gloomberg"
19
19
"github.com/benleb/gloomberg/internal/nemo/provider"
@@ -35,6 +35,7 @@ import (
35
35
"github.com/benleb/gloomberg/internal/ws"
36
36
"github.com/charmbracelet/log"
37
37
"github.com/ethereum/go-ethereum/common"
38
+ "github.com/muesli/termenv"
38
39
"github.com/prometheus/client_golang/prometheus/promhttp"
39
40
"github.com/redis/rueidis"
40
41
"github.com/spf13/cobra"
@@ -57,6 +58,8 @@ var liveCmd = &cobra.Command{
57
58
}
58
59
59
60
func runGloomberg (_ * cobra.Command , _ []string ) {
61
+ termenv .DefaultOutput ().ClearScreen ()
62
+
60
63
// print header
61
64
header := style .GetHeader (internal .GloombergVersion )
62
65
fmt .Println (header )
@@ -125,6 +128,14 @@ func runGloomberg(_ *cobra.Command, _ []string) {
125
128
gb .Pr (fmt .Sprintf ("connected to %s providers: %s" , style .AlmostWhiteStyle .Render (fmt .Sprint (len (providers ))), style .AlmostWhiteStyle .Render (strings .Join (nodeNames , ", " ))))
126
129
}
127
130
131
+ //
132
+ // degendata - ranks
133
+ go func () {
134
+ if err := degendata .LoadOpenseaRanks (gb ); err != nil {
135
+ gbl .Log .Errorf ("error loading opensea ranks: %v" , err )
136
+ }
137
+ }()
138
+
128
139
//
129
140
// queue for everything to print to the console
130
141
terminalPrinterQueue := make (chan string , 256 )
@@ -135,7 +146,6 @@ func runGloomberg(_ *cobra.Command, _ []string) {
135
146
}
136
147
137
148
// nepa
138
- // queueTokenTransactions := make(chan *totra.TokenTransaction, 256)
139
149
queueWsOutTokenTransactions := make (chan * totra.TokenTransaction , 256 )
140
150
queueWsInTokenTransactions := make (chan * totra.TokenTransaction , 256 )
141
151
nePa := nepa .NewNePa (gb )
@@ -148,9 +158,6 @@ func runGloomberg(_ *cobra.Command, _ []string) {
148
158
149
159
// trapri | ttx printer to process and format the token transactions
150
160
go trapri .TokenTransactionFormatter (gb , seawa )
151
- // for workerID := 1; workerID <= viper.GetInt("server.workers.ttxFormatter"); workerID++ {
152
- // go trapri.TokenTransactionFormatter(gb, seawa, queueWsOutTokenTransactions, queueWsInTokenTransactions)
153
- // }
154
161
155
162
// start subscribing
156
163
go nePa .Run ()
@@ -411,10 +418,6 @@ func runGloomberg(_ *cobra.Command, _ []string) {
411
418
}()
412
419
}
413
420
414
- // log.Print("")
415
- // degendata.ReadOSRawDataFiles(gb, "degendata/raw/opensea/")
416
- // log.Print("")
417
-
418
421
//
419
422
// web ui
420
423
if viper .GetBool ("web.enabled" ) {
@@ -423,10 +426,6 @@ func runGloomberg(_ *cobra.Command, _ []string) {
423
426
gb .PrMod ("web" , "web-ui started" )
424
427
}
425
428
426
- if err := degendata .LoadMetadatas (); err != nil {
427
- log .Error (err )
428
- }
429
-
430
429
// prometheus metrics
431
430
if viper .GetBool ("metrics.enabled" ) {
432
431
go func () {
@@ -512,6 +511,10 @@ func init() { //nolint:gochecknoinits
512
511
liveCmd .Flags ().Bool ("show-unknown" , false , "Show unknown" )
513
512
_ = viper .BindPFlag ("show.unknown" , liveCmd .Flags ().Lookup ("show-unknown" ))
514
513
514
+ // degendb
515
+ // liveCmd.Flags().StringVar(&ddbPath, "dd-path", "degendata", "path to degendata dir")
516
+ viper .SetDefault ("degendata.path" , "degendata" )
517
+
515
518
// worker settings
516
519
viper .SetDefault ("trapri.numOpenSeaEventhandlers" , 3 )
517
520
viper .SetDefault ("gloomberg.numEventHubHandlers" , 3 )
0 commit comments