mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-21 12:05:42 +00:00
chainHead_storage: Iterate over keys (#14628)
* chainHead: Iterate over key,values and key,hashes Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * chainHead/tests: Multi query with iteration over keys Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * chainHead/events: Fix typo in StorageQuery Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * chainHead: Take 10 from key iterator Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> --------- Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -300,9 +300,7 @@ where
|
||||
let items = items
|
||||
.into_iter()
|
||||
.map(|query| {
|
||||
if query.queue_type != StorageQueryType::Value &&
|
||||
query.queue_type != StorageQueryType::Hash
|
||||
{
|
||||
if query.query_type == StorageQueryType::ClosestDescendantMerkleValue {
|
||||
// Note: remove this once all types are implemented.
|
||||
let _ = sink.reject(ChainHeadRpcError::InvalidParam(
|
||||
"Storage query type not supported".into(),
|
||||
@@ -312,7 +310,7 @@ where
|
||||
|
||||
Ok(StorageQuery {
|
||||
key: StorageKey(parse_hex_param(&mut sink, query.key)?),
|
||||
queue_type: query.queue_type,
|
||||
query_type: query.query_type,
|
||||
})
|
||||
})
|
||||
.collect::<Result<Vec<_>, _>>()?;
|
||||
|
||||
Reference in New Issue
Block a user