forked from raiden-network/raiden
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix race condition with new blocks and filters
The race happened under this circunstance: - A node learns about a new block, updates its state, then crashes - On restart, the block number is recovered, the filters are installed with the latest known block. - The race: The node finishes the above before a new block is mined - The bug: The filter is polled during start of the RaidenService, by calling the AlarmTask.first_run, which always executes the callbacks, eventually using the StateFilter's to poll for new events from a block in the future. The fix was to give the latest known block number to the alarm task in the as an argument for first_run, and only execute the callbacks if there is a new block. fixes raiden-network#2838
- Loading branch information
1 parent
3bf51cc
commit a24a41b
Showing
2 changed files
with
58 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters