Skip to content

Commit

Permalink
improve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
dhaidashenko committed Jan 14, 2025
1 parent e9527c4 commit f07cc75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/solana/logpoller/job_get_block.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ import (
"github.com/smartcontractkit/chainlink-solana/pkg/solana/client"
)

// getBlockJob is a job that fetches transaction signatures from a block and loads
// the job queue with getTransactionLogsJobs for each transaction found in the block.
// getBlockJob is a job that fetches blocks with transactions, coverts logs into ProgramEvents and writes them into blocks channel
type getBlockJob struct {
slotNumber uint64
client RPCClient
Expand Down Expand Up @@ -49,7 +48,7 @@ func (j *getBlockJob) Run(ctx context.Context) error {
block, err := j.client.GetBlockWithOpts(
ctx,
j.slotNumber,
// NOTE: any change to the filtering arguments may affect calculation of logIndex, which to lead to events duplication.
// NOTE: any change to the filtering arguments may affect calculation of txIndex, which could lead to events duplication.
&rpc.GetBlockOpts{
Encoding: solana.EncodingBase64,
Commitment: rpc.CommitmentFinalized,
Expand Down
3 changes: 3 additions & 0 deletions pkg/solana/logpoller/job_get_slots_for_addr.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ import (

var _ worker.Job = (*getSlotsForAddressJob)(nil)

// getSlotsForAddressJob - identifies slots that contain transactions for specified address in range [from, to] and
// calls storeSlot for each. If single request was not sufficient to identify all slots - schedules a new job. Channel
// returned by Done() will be closed only when all jobs are done.
type getSlotsForAddressJob struct {
address PublicKey
beforeSig solana.Signature
Expand Down

0 comments on commit f07cc75

Please sign in to comment.