Files
pezkuwi-subxt/substrate/client
Alexandru Vasile cc50eda098 chainHead/storage: Fix storage iteration using the query key (#1665)
This PR ensures that all storage keys under a prefix are returned by the
`chainHead_storage` method.

Before this PR, the `storage_keys` was used with just the `start_key`.
Before the pagination event was generated, the last reported key
`last_key` was saved internally.
When the pagination is resumed, the `last_key` will serve as the next
`start_key` to the `storage_keys` API.

However, this behavior does not function properly for non-prefixed
storage keys.

Entry keys `a`, `ab`, `abc` share a common prefix and therefore the `ab`
key leads to `abc`.
However, for `a`, `ab`, `aB` and `abc`, the `aB` key does not
immediately lead to `abc`.

To mitigate this, the PR saves the start key of the query, together with
the next pagination key.
Improve testing to ensure we have a key entry that doesn't share the
prefix with the descendant key.

@paritytech/subxt-team

---------

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
2023-09-26 14:36:24 +03:00
..
2023-09-04 12:02:32 +03:00
2023-09-17 22:06:19 +02:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00
2023-09-04 12:02:32 +03:00