Skip to content

Commit

Permalink
Better error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
bruce-riley committed Nov 30, 2023
1 parent 4fe05aa commit bce2d59
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions node/pkg/watchers/solana/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -531,6 +531,7 @@ func (s *SolanaWatcher) fetchBlock(ctx context.Context, logger *zap.Logger, slot
zap.Int("txNum", txNum),
zap.Error(err),
)
continue
}

signature := tx.Signatures[0]
Expand Down Expand Up @@ -897,25 +898,25 @@ func (s *SolanaWatcher) populateLookupTableAccounts(ctx context.Context, tx *sol
for _, key := range tblKeys {
info, err := s.rpcClient.GetAccountInfo(ctx, key)
if err != nil {
return err
return fmt.Errorf("failed to get account info for key %s: %w", key, err)
}

tableContent, err := lookup.DecodeAddressLookupTableState(info.GetBinary())
if err != nil {
return err
return fmt.Errorf("failed to decode table content for key %s: %w", key, err)
}

resolutions[key] = tableContent.Addresses
}

err := tx.Message.SetAddressTables(resolutions)
if err != nil {
return err
return fmt.Errorf("failed to set address tables: %w", err)
}

err = tx.Message.ResolveLookups()
if err != nil {
return err
return fmt.Errorf("failed to resolve lookups: %w", err)
}

return nil
Expand Down

0 comments on commit bce2d59

Please sign in to comment.