diff --git a/pkg/solana/logpoller/job_get_block.go b/pkg/solana/logpoller/job_get_block.go index 59745cd5c..5ea6c1237 100644 --- a/pkg/solana/logpoller/job_get_block.go +++ b/pkg/solana/logpoller/job_get_block.go @@ -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 @@ -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, diff --git a/pkg/solana/logpoller/job_get_slots_for_addr.go b/pkg/solana/logpoller/job_get_slots_for_addr.go index da28d1581..d7518a058 100644 --- a/pkg/solana/logpoller/job_get_slots_for_addr.go +++ b/pkg/solana/logpoller/job_get_slots_for_addr.go @@ -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