@@ -107,7 +107,8 @@ func Test_LogPoller(t *testing.T) {
107107
108108 indexedCells := make ([]* cell.Cell , 0 , len (txs ))
109109 for _ , tx := range txs {
110- msgs , _ := tx .Transaction .IO .Out .ToSlice ()
110+ msgs , serr := tx .Transaction .IO .Out .ToSlice ()
111+ require .NoError (t , serr )
111112 for _ , msg := range msgs {
112113 // test contract only emits ExternalMessageOut
113114 if msg .MsgType == tlb .MsgTypeExternalOut {
@@ -152,7 +153,8 @@ func Test_LogPoller(t *testing.T) {
152153
153154 // Extract messages from the loaded transactions
154155 for _ , tx := range txs {
155- msgs , _ := tx .Transaction .IO .Out .ToSlice ()
156+ msgs , serr := tx .Transaction .IO .Out .ToSlice ()
157+ require .NoError (t , serr )
156158 for _ , msg := range msgs {
157159 if msg .MsgType == tlb .MsgTypeExternalOut {
158160 if extOut := msg .AsExternalOut (); extOut != nil {
@@ -894,7 +896,8 @@ func Test_LogPoller(t *testing.T) {
894896 return counterValue == preReplayEvents
895897 }, 30 * time .Second , 1 * time .Second , "counter should reach expected value" )
896898
897- counterValue , _ := counter .GetValue (t .Context (), tonChain .Client , emitter .ContractAddress ())
899+ counterValue , err := counter .GetValue (t .Context (), tonChain .Client , emitter .ContractAddress ())
900+ require .NoError (t , err )
898901 require .Equal (t , preReplayEvents , int (counterValue ))
899902
900903 // 3. Start LogPoller (with in-memory stores)
@@ -922,10 +925,11 @@ func Test_LogPoller(t *testing.T) {
922925 defer func () { require .NoError (t , lp .Close ()) }()
923926
924927 // 5. Verify no logs before replay
925- logs , _ , _ , _ := lp .NewQuery ().
928+ logs , _ , _ , err := lp .NewQuery ().
926929 WithSource (emitter .ContractAddress ()).
927930 WithEventSig (counter .TopicCountIncreased ).
928931 Execute (t .Context ())
932+ require .NoError (t , err )
929933 require .Empty (t , logs , "should have no logs before replay" )
930934
931935 // 6. Request replay from block before events were emitted
@@ -956,7 +960,8 @@ func Test_LogPoller(t *testing.T) {
956960 return false
957961 }
958962
959- result , _ := query.DecodedLogs [counter.CountIncreased ](logs )
963+ result , serr := query.DecodedLogs [counter.CountIncreased ](logs )
964+ require .NoError (t , serr )
960965 t .Logf ("found %d logs after replay" , len (result ))
961966 return len (result ) == preReplayEvents
962967 }, 60 * time .Second , 2 * time .Second , "replay should complete and index all events" )
@@ -969,11 +974,13 @@ func Test_LogPoller(t *testing.T) {
969974 }
970975
971976 require .Eventually (t , func () bool {
972- logs , _ , _ , _ := lp .NewQuery ().
977+ logs , _ , _ , err := lp .NewQuery ().
973978 WithSource (emitter .ContractAddress ()).
974979 WithEventSig (counter .TopicCountIncreased ).
975980 Execute (t .Context ())
976- result , _ := query.DecodedLogs [counter.CountIncreased ](logs )
981+ require .NoError (t , err )
982+ result , err := query.DecodedLogs [counter.CountIncreased ](logs )
983+ require .NoError (t , err )
977984 return len (result ) == preReplayEvents + postReplayEvents
978985 }, 30 * time .Second , 2 * time .Second , "should index new events after replay" )
979986 })
0 commit comments