@@ -2163,7 +2163,7 @@ func TestLogPoller_Reorg_On_Replay(t *testing.T) {
21632163 // Expected behaviour:
21642164 // 1. LogPoller should replace reorged block 11 with a new data.
21652165 // 2. DB must not contain at any point logs from both old and new block 11.
2166- // 3. Finality Violation must not occur, since chain did not violate finality depth.
2166+ // 3. Finality Violation must not occur, since chain did not violate finality depth.
21672167 t .Parallel ()
21682168 const reorgedBlockNumber = 11
21692169 testCases := []struct {
@@ -2210,7 +2210,7 @@ func TestLogPoller_Reorg_On_Replay(t *testing.T) {
22102210 th .Backend .Commit ()
22112211 }
22122212
2213- // start LogPoller and wait for it to complete first poll. Second poll won't happen until we call PollAndSaveLogs again , since poll period is very long.
2213+ // Start LogPoller and wait for it to complete the first poll. The second poll won't happen until we call Replay , since the poll period is very long.
22142214 require .NoError (t , th .LogPoller .Start (t .Context ()))
22152215 defer func () {
22162216 require .NoError (t , th .LogPoller .Close ())
@@ -2224,16 +2224,17 @@ func TestLogPoller_Reorg_On_Replay(t *testing.T) {
22242224 require .NoError (t , err )
22252225 require .Equal (t , int64 (reorgedBlockNumber ), reorgedBlock .Number ().Int64 ())
22262226
2227- // Replace block 11 with a new block and burry it under 1 new block
2227+ // Replace block 11 with a new block and bury it under 1 new block
22282228 require .NoError (t , th .Backend .Fork (reorgedBlock .ParentHash ()))
22292229 const newLogData = int64 (123 )
22302230 // Commit reorgedBlock and numberOfBlocksAfterReorg on top of it
22312231 for range tc .numberOfBlocksAfterReorg + 1 {
22322232 // emit log that is not tracked by LP to ensure that tracked log has a different index.
2233- // So if reorg is not properly handled and both logs end up in the database
2233+ // So if reorg is not properly handled, both logs end up in the database and the test fails.
22342234 _ , err = th .Emitter2 .EmitLog1 (th .Owner , []* big.Int {big .NewInt (int64 (10 ))})
22352235 require .NoError (t , err )
22362236 _ , err = th .Emitter1 .EmitLog1 (th .Owner , []* big.Int {big .NewInt (newLogData )})
2237+ require .NoError (t , err )
22372238 th .Backend .Commit ()
22382239 }
22392240
0 commit comments