From 922e19a3f36b529091dbd1c47cc004663474411e Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Thu, 25 May 2023 13:59:12 +0300 Subject: [PATCH] types: Handle storage replies from chainHead_storage Signed-off-by: Alexandru Vasile --- subxt/src/rpc/types.rs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/subxt/src/rpc/types.rs b/subxt/src/rpc/types.rs index 14b7fff42b..3d6e0f1ea6 100644 --- a/subxt/src/rpc/types.rs +++ b/subxt/src/rpc/types.rs @@ -509,7 +509,16 @@ pub enum FollowEvent { #[serde(rename_all = "camelCase")] pub struct ChainHeadResult { /// Result of the method. + #[cfg(not(feature = "experimental-light-client"))] pub result: T, + /// Result of the method. + /// + /// # Note + /// + /// `chainHead_body` returns a vector of values, while + /// `chainHead_storage` returns just one plain element. + #[cfg(feature = "experimental-light-client")] + pub value: T, } /// The event generated by the body / call / storage methods.