mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 08:51:09 +00:00
Remove support for chainHead_storage for light client
Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -13,11 +13,9 @@
|
||||
//! This feature is experimental and things might break without notice.
|
||||
|
||||
use futures::StreamExt;
|
||||
use sp_keyring::AccountKeyring;
|
||||
use std::sync::Arc;
|
||||
use subxt::{
|
||||
rpc::{types::FollowEvent, LightClient},
|
||||
utils::AccountId32,
|
||||
OnlineClient, PolkadotConfig,
|
||||
};
|
||||
|
||||
@@ -82,21 +80,6 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
} else {
|
||||
println!(" chainHead_header: Header not in memory for {hash}");
|
||||
}
|
||||
|
||||
// Make a storage query.
|
||||
let account_id: AccountId32 = AccountKeyring::Alice.to_account_id().into();
|
||||
let addr = polkadot::storage().system().account(account_id);
|
||||
let addr_bytes = api.storage().address_bytes(&addr).unwrap();
|
||||
|
||||
let mut sub = api
|
||||
.rpc()
|
||||
.chainhead_unstable_storage(sub_id.clone(), hash, &addr_bytes, None)
|
||||
.await?;
|
||||
|
||||
if let Some(event) = sub.next().await {
|
||||
let event = event?;
|
||||
println!(" chainHead_storage event: {event:?}");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user