Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core): properly parse genesis alloc storage (#2205)
* fix(core): properly parse genesis alloc storage * Previously we were not properly parsing the storage field of GenesisAlloc. The first issue was in using serde(flatten), which is just incorrect because storage is not encoded flattened. The second issue was in the parsing of H256 keys and values. Some of the storage values in hive genesis examples were encoded in less than 64 hex characters, such as the string `0x12`. This would not succeed normal H256 parsing. * Introduce from_unformatted_hex_map to properly deserialize the storage map. * Modify existing genesis parsing tests to check parsed storage and code values against expected values. * Introduce new genesis parsing test from the hive smoke tests, checking full struct equality. * remove unused from_unformatted hex * make clippy happy
- Loading branch information
Showing
2 changed files
with
258 additions
and
9 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