Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix remaining data race in BurningManAccountingStore
Add missing synchronisation to the 'toProtoMessage' method, by first copying the internal list of blocks inside a read-lock, prior to serialisation (still outside the lock, to maximise concurrency). Since we only make a shallow copy, this should be fast and take no more than a MB or so of extra memory. This prevents a race seen to cause a ConcurrentModificationException during store persistence, that sometimes occurred when the application resumed from a long suspension.
- Loading branch information