Add GetLock() to the finalization state repository and acquire them every time finalization state is fetched from the repository.
Although we never faced with such an issue, it's possible that finalization state could be deleted by StateRepository::TrimUntilHeight during it's still in use by another thread.
Add
GetLock()
to the finalization state repository and acquire them every time finalization state is fetched from the repository.Although we never faced with such an issue, it's possible that finalization state could be deleted by
StateRepository::TrimUntilHeight
during it's still in use by another thread.Fixes #489.