Skip to content

Commit

Permalink
fix / by 0
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Sep 14, 2023
1 parent 97b1d26 commit 3f98033
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions accountresolver/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,15 @@ func (p *Processor) applyTableLookup(ctx context.Context, blockNum uint64, trx *
trx.Transaction.Message.AccountKeys = append(trx.Transaction.Message.AccountKeys, accs.ToBytesArray()...)
}
totalDuration := time.Since(start)
p.logger.Info(
"applyTableLookup",
zap.Duration("duration", totalDuration),
zap.Int64("average_lookup_time", totalDuration.Milliseconds()/int64(len(trx.Transaction.Message.AddressTableLookups))))
lookupCount := len(trx.Transaction.Message.AddressTableLookups)
if lookupCount > 0 {
p.logger.Info(
"applyTableLookup",
zap.Duration("duration", totalDuration),
zap.Int64("average_lookup_time", totalDuration.Milliseconds()/int64(lookupCount)),
)

}
return nil
}

Expand Down

0 comments on commit 3f98033

Please sign in to comment.