Repository navigation
Commit 2198ea7
authored
Remove filters synchronously in eth_uninstallFilter (#4381)
The EVM RPC parity test `eth_newBlockFilter uninstalls once (true), then
reports gone (false)` fails intermittently because `eth_uninstallFilter`
does not remove the filter before it returns. `UninstallFilter` only
checks that the filter exists, queues its ID on `toDelete`, and returns
true. The cleanup loop deletes it later. A second `eth_uninstallFilter`
sent right after the first can still find the filter and also return
true, where geth returns false.
`UninstallFilter` now deletes the filter under the write lock and
returns whether it existed. This removes the `toDelete` channel and its
case in the cleanup loop; timeout-based expiry is unchanged. A new unit
test calls `UninstallFilter` twice on a block filter and checks the
results are true then false. It failed 20 out of 20 runs before this
change.
Flaked in:
https://github.com/sei-protocol/sei-chain/actions/runs/36590599736/job/1094844564671 parent 2740979 commit 2198ea7
2 files changed
Lines changed: 23 additions & 33 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
269 | 269 | | |
270 | 270 | | |
271 | 271 | | |
272 | | - | |
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
| |||
345 | 344 | | |
346 | 345 | | |
347 | 346 | | |
348 | | - | |
349 | 347 | | |
350 | 348 | | |
351 | 349 | | |
| |||
415 | 413 | | |
416 | 414 | | |
417 | 415 | | |
418 | | - | |
419 | 416 | | |
420 | 417 | | |
421 | 418 | | |
| |||
430 | 427 | | |
431 | 428 | | |
432 | 429 | | |
433 | | - | |
434 | | - | |
435 | | - | |
436 | 430 | | |
437 | 431 | | |
438 | 432 | | |
| |||
465 | 459 | | |
466 | 460 | | |
467 | 461 | | |
468 | | - | |
| 462 | + | |
469 | 463 | | |
470 | 464 | | |
471 | 465 | | |
472 | | - | |
473 | | - | |
474 | | - | |
475 | | - | |
476 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
477 | 473 | | |
| 474 | + | |
478 | 475 | | |
479 | 476 | | |
480 | 477 | | |
| |||
782 | 779 | | |
783 | 780 | | |
784 | 781 | | |
785 | | - | |
786 | | - | |
787 | | - | |
788 | | - | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | | - | |
793 | | - | |
794 | | - | |
795 | | - | |
796 | | - | |
797 | | - | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
| 782 | + | |
804 | 783 | | |
805 | 784 | | |
806 | 785 | | |
| |||
816 | 795 | | |
817 | 796 | | |
818 | 797 | | |
819 | | - | |
820 | | - | |
821 | 798 | | |
822 | 799 | | |
823 | 800 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
0 commit comments