This repository was archived by the owner on Oct 28, 2021. It is now read-only.
Fix ChainParams::loadConfig not loading precompile configuration#5821
Merged
Fix ChainParams::loadConfig not loading precompile configuration#5821
Conversation
0b1ee68 to
007558f
Compare
Codecov Report
@@ Coverage Diff @@
## master #5821 +/- ##
==========================================
- Coverage 64.14% 64.12% -0.02%
==========================================
Files 360 360
Lines 30868 30866 -2
Branches 3428 3428
==========================================
- Hits 19801 19794 -7
- Misses 9839 9842 +3
- Partials 1228 1230 +2 |
insert method of the precompile map was not changing anything when previous map already contained the same key. Now loading config always starts with default-initialized ChainParams (with empty precompile map)
f2cdfd2 to
9b67ec5
Compare
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This gets rid of a weird pattern where
ChainParams::loadConfigfirst created anotherChainParamsinstance by copying*this, then applied config values from JSON on top of it, thenChainParamsconstuctor assigned result ofloadConfigto*this.Instead of this, there's now just a normal
ChainParamsconstructor taking JSON string.loadConfigis made private and modifies members of current object. The same withloadGenesis.Fixes #5819