WIP more backend work

This commit is contained in:
James Wilson
2025-11-28 17:20:02 +00:00
parent fbde20cb0e
commit b216240575
10 changed files with 425 additions and 129 deletions
+1 -11
View File
@@ -9,11 +9,6 @@
//! Specifically, the focus here is on the `archive` methods. These can only be used
//! to interact with archive nodes, but are less restrictive than the `chainHead` methods
//! in terms of the allowed operations.
//!
//! # Warning
//!
//! Everything in this module is **unstable**, meaning that it could change without
//! warning at any time.
mod storage_stream;
@@ -31,11 +26,6 @@ use subxt_rpcs::methods::chain_head::{
};
use storage_stream::ArchiveStorageStream;
/// Re-export RPC types and methods from [`subxt_rpcs::methods::chain_head`].
pub mod rpc_methods {
pub use subxt_rpcs::methods::chain_head::*;
}
// Expose the RPC methods.
pub use subxt_rpcs::methods::chain_head::ChainHeadRpcMethods as ArchiveRpcMethods;
@@ -203,7 +193,7 @@ impl<T: Config> Backend<T> for ArchiveBackend<T> {
let res = self.methods.archive_v1_call(at, method, call_parameters.unwrap_or(&[])).await?;
match res {
ArchiveCallResult::Success(bytes) => Ok(bytes.0),
ArchiveCallResult::Error(e) => Err(BackendError::Other(e)),
ArchiveCallResult::Error(e) => Err(BackendError::other(e)),
}
}
}