@@ -83,12 +83,12 @@ func (s *txScraper) pollOne(ctx context.Context, wg *sync.WaitGroup, tailer *txT
8383 defer wg .Done ()
8484 for {
8585 isEnd , err := tailer .poll (ctx )
86- if isEnd {
87- break
88- }
8986 if err != nil {
9087 s .log .Warn ("Failed to poll account txs" , zap .Error (err ))
9188 }
89+ if isEnd {
90+ break
91+ }
9292 }
9393}
9494
@@ -111,6 +111,9 @@ func newTxTailer(scraper *txScraper, pubkey solana.PublicKey) *txTailer {
111111}
112112
113113func (t * txTailer ) refreshLastSig (ctx context.Context ) error {
114+ t .log .Debug ("Getting latest sig" ,
115+ zap .String ("publisher" , t .pubkeyStr ))
116+
114117 oneInt := 1
115118 sigs , err := t .rpc .GetSignaturesForAddressWithOpts (ctx , t .pubkey , & rpc.GetSignaturesForAddressOpts {
116119 Limit : & oneInt ,
@@ -121,10 +124,17 @@ func (t *txTailer) refreshLastSig(ctx context.Context) error {
121124 metrics .RpcRequestsTotal .Inc ()
122125
123126 if len (sigs ) == 0 {
127+ t .log .Debug ("Publisher has not sent any txs yet" ,
128+ zap .String ("publisher" , t .pubkeyStr ))
124129 return nil // empty account
125130 }
126131 t .lastSlot = sigs [0 ].Slot
127132 t .lastSig = sigs [0 ].Signature
133+
134+ t .log .Debug ("Tailing txs starting at" ,
135+ zap .String ("publisher" , t .pubkeyStr ),
136+ zap .Stringer ("start_sig" , t .lastSig ))
137+
128138 return nil
129139}
130140
0 commit comments