Adding the remaining "partial conversion" methods to `DatabaseKeyMapp… #1649
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 non-breaking, internal-only change PR adds some "missing" partial-conversion methods to the
DatabaseKeyMapper
(i.e.from_db_node_key(), from_db_partition_num()
).Why?
Node's new Browse API needs to list "entity addresses" (see https://radixdlt.atlassian.net/wiki/spaces/RPNV1/pages/3189211214/RNP-12+-+Browse+API+sub-API+within+Core+API#1.-Entity-Listing), which are effectively RE Node IDs, converted from DB Node keys. The Engine's mapper so far only provided the conversion for a
(DB Node key, DB partition num)
pair, which forced Node to use a mild-but-avoidable hack.The exact Node
TODO
: https://github.com/radixdlt/babylon-node/pull/736/files#diff-148a2d8426fe568c7f0cab8adda124b9958ea5f3bc23e41c490d566bc8ffe103R279