Skip to content

Commit

Permalink
Temporary - extra logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
winder committed Oct 26, 2022
1 parent 559f542 commit 10fa5ac
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 1 deletion.
2 changes: 2 additions & 0 deletions conduit/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,8 @@ func (p *pipelineImpl) Init() error {
if err != nil {
return fmt.Errorf("Pipeline.Start(): could not serialize Processors[%d].Config : %w", idx, err)
}
fmt.Println("CONFIG")
fmt.Println(string(configs))
err := (*processor).Init(p.ctx, *p.initProvider, plugins.PluginConfig(configs), processorLogger)
processorName := (*processor).Metadata().Name()
if err != nil {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def setup(self, accumulated_config):
def resolve_config_input(self):
self.config_input = {
"catchpoint": self.catchpoint,
"indexer-data-dir": self.indexer_data_dir,
"data-dir": self.indexer_data_dir,
"algod-data-dir": self.algod_data_dir,
"algod-token": self.algod_token,
"algod-addr": self.algod_net,
Expand Down
8 changes: 8 additions & 0 deletions processors/blockprocessor/block_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,10 @@ func (proc *blockProcessor) Init(ctx context.Context, initProvider data.InitProv
return fmt.Errorf("blockprocessor init error: %w", err)
}
proc.cfg = cfg
fmt.Println("BLOCKPROCESSOR CONFIG")
fmt.Println(cfg)
fmt.Println(pCfg)
fmt.Printf("DATA DIR: %s\n", pCfg.IndexerDatadir)

genesis := initProvider.GetGenesis()
round := uint64(initProvider.NextDBRound())
Expand All @@ -93,6 +97,10 @@ func (proc *blockProcessor) Init(ctx context.Context, initProvider data.InitProv
return fmt.Errorf("could not initialize ledger: %w", err)
}

fmt.Println("BLOCKPROCESSOR CONFIG-------------")
fmt.Println(cfg)
fmt.Println(pCfg)
fmt.Printf("DATA DIR: %s\n", pCfg.IndexerDatadir)
l, err := util.MakeLedger(proc.logger, false, genesis, pCfg.IndexerDatadir)
if err != nil {
return fmt.Errorf("could not make ledger: %w", err)
Expand Down
1 change: 1 addition & 0 deletions util/ledger_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ func createInitState(genesis *bookkeeping.Genesis) (ledgercore.InitState, error)
// MakeLedger opens a ledger, initializing if necessary.
func MakeLedger(logger *log.Logger, inMemory bool, genesis *bookkeeping.Genesis, dataDir string) (*ledger.Ledger, error) {
const prefix = "ledger"
fmt.Printf("MakeLedger(%s)\n", dataDir)
err := os.MkdirAll(dataDir, 0755)
if err != nil {
return nil, fmt.Errorf("MakeProcessor() failed to create '%s': %w", dataDir, err)
Expand Down

0 comments on commit 10fa5ac

Please sign in to comment.