Skip to content

Commit

Permalink
fix load of custom consensus
Browse files Browse the repository at this point in the history
  • Loading branch information
scholtz committed Sep 15, 2024
1 parent 8e7d2e5 commit 25a660c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cmd/algorand-indexer/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ import (
"github.com/spf13/pflag"
"github.com/spf13/viper"

sdkConfig "github.com/algorand/go-algorand-sdk/v2/protocol/config"

"github.com/algorand/indexer/v3/api"
"github.com/algorand/indexer/v3/api/generated/v2"
"github.com/algorand/indexer/v3/config"
Expand Down Expand Up @@ -200,6 +202,14 @@ func runDaemon(daemonConfig *daemonConfig) error {
daemonConfig.configFile = os.Getenv("INDEXER_CONFIGFILE")
}

// Read custom consensus file for custom protocols
var consensus sdkConfig.ConsensusProtocols
consensus , consensusErr := sdkConfig.PreloadConfigurableConsensusProtocols(daemonConfig.indexerDataDir)

Check failure on line 207 in cmd/algorand-indexer/daemon.go

View workflow job for this annotation

GitHub Actions / reviewdog-errors

undefined: sdkConfig.PreloadConfigurableConsensusProtocols (typecheck)

Check failure on line 207 in cmd/algorand-indexer/daemon.go

View workflow job for this annotation

GitHub Actions / reviewdog-errors

undefined: sdkConfig.PreloadConfigurableConsensusProtocols (typecheck)

Check failure on line 207 in cmd/algorand-indexer/daemon.go

View workflow job for this annotation

GitHub Actions / reviewdog-errors

[Lint Errors] reported by reviewdog 🐶 undefined: sdkConfig.PreloadConfigurableConsensusProtocols (typecheck) Raw Output: cmd/algorand-indexer/daemon.go:207:40: undefined: sdkConfig.PreloadConfigurableConsensusProtocols (typecheck) package main

Check failure on line 207 in cmd/algorand-indexer/daemon.go

View workflow job for this annotation

GitHub Actions / reviewdog-warnings

undefined: sdkConfig.PreloadConfigurableConsensusProtocols (typecheck)

Check failure on line 207 in cmd/algorand-indexer/daemon.go

View workflow job for this annotation

GitHub Actions / reviewdog-warnings

undefined: sdkConfig.PreloadConfigurableConsensusProtocols (typecheck)

Check failure on line 207 in cmd/algorand-indexer/daemon.go

View workflow job for this annotation

GitHub Actions / reviewdog-warnings

[Lint Warnings] reported by reviewdog 🐶 undefined: sdkConfig.PreloadConfigurableConsensusProtocols (typecheck) Raw Output: cmd/algorand-indexer/daemon.go:207:40: undefined: sdkConfig.PreloadConfigurableConsensusProtocols (typecheck) package main
if consensusErr != nil {
return consensusErr
}
sdkConfig.Consensus = consensus

// Create the data directory if necessary/possible
if err = configureIndexerDataDir(daemonConfig.indexerDataDir); err != nil {
return err
Expand Down

0 comments on commit 25a660c

Please sign in to comment.