Skip to content

Commit

Permalink
improve log fields for contract indexer/matcher
Browse files Browse the repository at this point in the history
  • Loading branch information
pk910 committed Oct 24, 2024
1 parent d6aa153 commit af34759
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions indexer/execution/consolidation_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ func NewConsolidationIndexer(indexer *IndexerCtx) *ConsolidationIndexer {

ci := &ConsolidationIndexer{
indexerCtx: indexer,
logger: indexer.logger.WithField("indexer", "consolidation"),
logger: indexer.logger.WithField("indexer", "consolidations"),
}

specs := indexer.chainState.GetSpecs()

// create contract indexer for the consolidation contract
ci.indexer = newContractIndexer(
indexer,
ci.logger.WithField("routine", "crawler"),
indexer.logger.WithField("contract-indexer", "consolidations"),
&contractIndexerOptions[dbtypes.ConsolidationRequestTx]{
stateKey: "indexer.consolidationindexer",
batchSize: batchSize,
Expand All @@ -67,7 +67,7 @@ func NewConsolidationIndexer(indexer *IndexerCtx) *ConsolidationIndexer {
// create transaction matcher for the consolidation contract
ci.matcher = newTransactionMatcher(
indexer,
ci.logger.WithField("routine", "matcher"),
indexer.logger.WithField("contract-matcher", "consolidations"),
&transactionMatcherOptions[consolidationRequestMatch]{
stateKey: "indexer.consolidationmatcher",
deployBlock: uint64(utils.Config.ExecutionApi.ElectraDeployBlock),
Expand Down
6 changes: 3 additions & 3 deletions indexer/execution/withdrawal_indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ func NewWithdrawalIndexer(indexer *IndexerCtx) *WithdrawalIndexer {

wi := &WithdrawalIndexer{
indexerCtx: indexer,
logger: indexer.logger.WithField("indexer", "withdrawal"),
logger: indexer.logger.WithField("indexer", "withdrawals"),
}

specs := indexer.chainState.GetSpecs()

// create contract indexer for the withdrawal contract
wi.indexer = newContractIndexer(
indexer,
wi.logger.WithField("routine", "crawler"),
indexer.logger.WithField("contract-indexer", "withdrawals"),
&contractIndexerOptions[dbtypes.WithdrawalRequestTx]{
stateKey: "indexer.withdrawalindexer",
batchSize: batchSize,
Expand All @@ -68,7 +68,7 @@ func NewWithdrawalIndexer(indexer *IndexerCtx) *WithdrawalIndexer {
// create transaction matcher for the withdrawal contract
wi.matcher = newTransactionMatcher(
indexer,
wi.logger.WithField("routine", "matcher"),
indexer.logger.WithField("contract-matcher", "withdrawals"),
&transactionMatcherOptions[withdrawalRequestMatch]{
stateKey: "indexer.withdrawalmatcher",
deployBlock: uint64(utils.Config.ExecutionApi.ElectraDeployBlock),
Expand Down

0 comments on commit af34759

Please sign in to comment.