@@ -2161,7 +2161,7 @@ func TestLogPoller_Reorg_On_Replay(t *testing.T) {
21612161 // Expected behaviour:
21622162 // 1. LogPoller should replace reorged block 11 with a new data.
21632163 // 2. DB must not contain at any point logs from both old and new block 11.
2164- // 3. Finality Violation must not occur, since chain did not violate finality depth.
2164+ // 3. Finality Violation must not occur, since chain did not violate finality depth.
21652165 t .Parallel ()
21662166 const reorgedBlockNumber = 11
21672167 testCases := []struct {
@@ -2208,7 +2208,7 @@ func TestLogPoller_Reorg_On_Replay(t *testing.T) {
22082208 th .Backend .Commit ()
22092209 }
22102210
2211- // 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.
2211+ // 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.
22122212 require .NoError (t , th .LogPoller .Start (t .Context ()))
22132213 defer func () {
22142214 require .NoError (t , th .LogPoller .Close ())
@@ -2222,16 +2222,17 @@ func TestLogPoller_Reorg_On_Replay(t *testing.T) {
22222222 require .NoError (t , err )
22232223 require .Equal (t , int64 (reorgedBlockNumber ), reorgedBlock .Number ().Int64 ())
22242224
2225- // Replace block 11 with a new block and burry it under 1 new block
2225+ // Replace block 11 with a new block and bury it under 1 new block
22262226 require .NoError (t , th .Backend .Fork (reorgedBlock .ParentHash ()))
22272227 const newLogData = int64 (123 )
22282228 // Commit reorgedBlock and numberOfBlocksAfterReorg on top of it
22292229 for range tc .numberOfBlocksAfterReorg + 1 {
22302230 // emit log that is not tracked by LP to ensure that tracked log has a different index.
2231- // So if reorg is not properly handled and both logs end up in the database
2231+ // So if reorg is not properly handled, both logs end up in the database and the test fails.
22322232 _ , err = th .Emitter2 .EmitLog1 (th .Owner , []* big.Int {big .NewInt (int64 (10 ))})
22332233 require .NoError (t , err )
22342234 _ , err = th .Emitter1 .EmitLog1 (th .Owner , []* big.Int {big .NewInt (newLogData )})
2235+ require .NoError (t , err )
22352236 th .Backend .Commit ()
22362237 }
22372238
0 commit comments