-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Encapsulate mutable Block tx list and DaoState tx cache
Avoid mutating the Block tx list or the DaoState tx cache/index via a Lombok getter. Instead wrap each in an unmodifiable[List|Map] & provide specific mutator methods for use by DaoStateService to add newly parsed transactions or load a DAO snapshot. Also rename txMap to txCache, replace remaining use of getTxStream() in the JSON file exporter with getUnorderedTxStream() (as this is safe) and swap the arguments of the txCache initialisation merge function, for exact consistency with the pre-caching behaviour. Finally, add a missing assertDaoStateChange() and remove a potentially harmful assertion from DaoStateService.onNewTxForLastBlock. This is based on a suggested patch by @chimp1984 in the PR #3773 review.
- Loading branch information
Showing
7 changed files
with
56 additions
and
35 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
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
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