Skip to content

Commit

Permalink
remove noisy log again
Browse files Browse the repository at this point in the history
  • Loading branch information
billettc committed Sep 21, 2023
1 parent 81668b0 commit bcf6f54
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion accountresolver/processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ func (p *Processor) applyTableLookup(ctx context.Context, blockNum uint64, trx *
if cached {
p.stats.cacheHit += 1
}
p.logger.Debug("Resolve address table lookup", zap.String("trx", getTransactionHash(trx.Transaction.Signatures)), zap.String("account", base58.Encode(addressTableLookup.AccountKey)), zap.Int("count", len(accs)), zap.Bool("cached", cached))
//p.logger.Debug("Resolve address table lookup", zap.String("trx", getTransactionHash(trx.Transaction.Signatures)), zap.String("account", base58.Encode(addressTableLookup.AccountKey)), zap.Int("count", len(accs)), zap.Bool("cached", cached))
trx.Transaction.Message.AccountKeys = append(trx.Transaction.Message.AccountKeys, accs.ToBytesArray()...)
}
totalDuration := time.Since(start)
Expand Down
10 changes: 5 additions & 5 deletions accountresolver/resolver.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@ func (r *KVDBAccountsResolver) Extend(ctx context.Context, blockNum uint64, trxH

func (r *KVDBAccountsResolver) Resolve(ctx context.Context, atBlockNum uint64, key Account) (Accounts, bool, error) {
if cacheItems, ok := r.cache[key.base58()]; ok {
for _, cacheItem := range cacheItems {
r.logger.Debug("cached item", zap.Uint64("block_num", cacheItem.blockNum), zap.Uint64("at_block_num", atBlockNum), zap.String("key", key.base58()))
}
//for _, cacheItem := range cacheItems {
// r.logger.Debug("cached item", zap.Uint64("block_num", cacheItem.blockNum), zap.Uint64("at_block_num", atBlockNum), zap.String("key", key.base58()))
//}
for _, cacheItem := range cacheItems {
if cacheItem.blockNum <= atBlockNum {
r.logger.Debug("match cache item", zap.Uint64("block_num", cacheItem.blockNum), zap.Uint64("at_block_num", atBlockNum), zap.String("key", key.base58()))
//r.logger.Debug("match cache item", zap.Uint64("block_num", cacheItem.blockNum), zap.Uint64("at_block_num", atBlockNum), zap.String("key", key.base58()))
return cacheItem.accounts, true, nil
}
}
Expand All @@ -99,7 +99,7 @@ func (r *KVDBAccountsResolver) Resolve(ctx context.Context, atBlockNum uint64, k
blockNum: keyBlockNum,
accounts: accounts,
})
r.logger.Debug("caching item", zap.Uint64("key_block_num", keyBlockNum), zap.String("key", key.base58()))
//r.logger.Debug("caching item", zap.Uint64("key_block_num", keyBlockNum), zap.String("key", key.base58()))

if keyBlockNum <= atBlockNum && resolvedAccounts == nil {
resolvedAccounts = accounts
Expand Down

0 comments on commit bcf6f54

Please sign in to comment.