Skip to content

Commit

Permalink
wip...
Browse files Browse the repository at this point in the history
  • Loading branch information
colindickson committed Sep 3, 2024
1 parent 537c968 commit d1ead48
Show file tree
Hide file tree
Showing 8 changed files with 1,334 additions and 638 deletions.
5 changes: 3 additions & 2 deletions cmd/firenear/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ func main() {
ExecutableName: "near-firehose-indexer",
FullyQualifiedModule: "github.com/streamingfast/firehose-near",
Version: version,
DefaultBlockType: "sf.near.type.v1.Block",

BlockFactory: func() firecore.Block { return new(pbnear.Block) },

Expand All @@ -35,8 +36,8 @@ func main() {
},

ConsoleReaderFactory: func(lines chan string, blockEncoder firecore.BlockEncoder, logger *zap.Logger, tracer logging.Tracer) (mindreader.ConsolerReader, error) {
// FIXME: This was hardcoded also in the previouse firehose-near version, Firehose will break if this is not available
return codec.NewConsoleReader(lines, blockEncoder, "http://localhost:3030")
// FIXME: This was hardcoded also in the previous firehose-near version, Firehose will break if this is not available
return codec.NewConsoleReader(lines, firecore.NewBlockEncoder(), "http://localhost:3030")
},

RegisterExtraStartFlags: func(flags *pflag.FlagSet) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ import (
"strings"
"time"

"github.com/streamingfast/firehose-core/node-manager/operator"

firecore "github.com/streamingfast/firehose-core"

"github.com/spf13/cobra"
"github.com/spf13/viper"
"github.com/streamingfast/dstore"
firecore "github.com/streamingfast/firehose-core"
"github.com/streamingfast/node-manager/operator"
"github.com/streamingfast/firehose-core/node-manager/operator"
"go.uber.org/zap"
)

Expand All @@ -30,16 +26,23 @@ func newReaderNodeBootstrapper(
) (operator.Bootstrapper, error) {
hostname, _ := os.Hostname()

fmt.Println("Hostname", hostname)
fmt.Println("Config file", viper.GetString("reader-node-config-file"))
logger.Info("bootstrapping reader node",
zap.String("hostname", hostname),
zap.String("config_file", viper.GetString("reader-node-config-file")),
)

configFile := replaceNodeRole(viper.GetString("reader-node-config-file"), hostname)
genesisFile := replaceNodeRole(viper.GetString("reader-node-genesis-file"), hostname)
nodeKeyFile := replaceHostname(viper.GetString("reader-node-key-file"), hostname)
nodeDataDir := replaceHostname(viper.GetString("reader-node-data-dir"), hostname)
overwriteNodeFiles := viper.GetBool("reader-node-overwrite-node-files")

fmt.Println("Config final", configFile)
logger.Info("final node configuration",
zap.String("config_file", configFile),
zap.String("genesis_file", genesisFile),
zap.String("node_key_file", nodeKeyFile),
zap.String("node_data_dir", nodeDataDir),
)

return &bootstrapper{
configFile: configFile,
Expand Down
23 changes: 0 additions & 23 deletions cmd/firenear/tools_backfill.go

This file was deleted.

269 changes: 0 additions & 269 deletions cmd/firenear/tools_backfill_fix_encoding.go

This file was deleted.

Loading

0 comments on commit d1ead48

Please sign in to comment.