[Account Storage Maps] Add more tests for register reads for GetDomainStorageMap() #3694
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.
Updates #3584
This PR adds more tests for register reads from
GetDomainStorageMap()
for account storage format v1 and v2.Context
This PR addresses comment in PR #3683. Thanks @turbolent for great suggestion! 👍
This PR updates these tests ported from #3683:
TestGetDomainStorageMapRegisterReadsForNewAccount
TestGetDomainStorageMapRegisterReadsForV1Account
TestGetDomainStorageMapRegisterReadsForV2Account
While at it, I also updated these tests to include unique register reads (in addition to sequence of register reads). Same register can be read multiple times and all reads are included in the sequence. Since subsequent register reads are from ledger cache, unique register reads are more important for performance reasons.
Unique register reads differs from that in PR #3683 ("Reduce storage register reads when using StorageFormatV2Enabled") when using StorageFormatV2Enabled:
createIfNotExists
is false, old approach has 10 unique register reads, while new approach has 2 unique register reads.createIfNotExists
is false, old approach has 4 unique register reads in tests, while new approach has 2 unique register reads.master
branchFiles changed
in the Github PR explorer