-
Notifications
You must be signed in to change notification settings - Fork 129
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(dot/core): fix the race condition in TrieState (#2499)
Passing nil hash argument in `TrieState(nil)` returns `TrieState(stateRoot hash of best block)` and `GetRuntime(nil)` returns `GetRuntime(best block hash)`. In `HandleSubmittedExtrinsic`, It is likely that in the time between those function calls, a block has been imported, in which case blocks used by them would not match, which is not what we expect. This commit fixes that by getting the best block hash first and using them, instead of passing nil. Fixes #2402
- Loading branch information
1 parent
014629d
commit 804069c
Showing
3 changed files
with
42 additions
and
14 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
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