Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix load of custom consensus - get protocol err #1631

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@
"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 @@
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
Loading