Add ability to stream blocks and tidy errors

This commit is contained in:
James Wilson
2025-12-02 13:11:36 +00:00
parent a6a384c5bc
commit e4028e5a77
27 changed files with 888 additions and 643 deletions
+8 -4
View File
@@ -216,7 +216,7 @@ where
> {
use futures::stream::StreamExt;
use subxt_rpcs::methods::chain_head::{
ArchiveStorageEvent, StorageQuery, StorageQueryType,
ArchiveStorageEvent, ArchiveStorageQuery, StorageQueryType,
};
let expected_num_keys = with_info!(info = &*self.info => {
@@ -235,9 +235,10 @@ where
let block_hash = self.client.block_hash();
let key_bytes = self.key(keys)?;
let items = std::iter::once(StorageQuery {
let items = std::iter::once(ArchiveStorageQuery {
key: &*key_bytes,
query_type: StorageQueryType::DescendantsValues,
pagination_start_key: None,
});
let sub = self
@@ -297,11 +298,14 @@ where
T: Config + 'atblock,
Client: OnlineClientAtBlockT<'atblock, T>,
{
use subxt_rpcs::methods::chain_head::{ArchiveStorageEvent, StorageQuery, StorageQueryType};
use subxt_rpcs::methods::chain_head::{
ArchiveStorageEvent, ArchiveStorageQuery, StorageQueryType,
};
let query = StorageQuery {
let query = ArchiveStorageQuery {
key: key_bytes,
query_type: StorageQueryType::Value,
pagination_start_key: None,
};
let mut response_stream = client