xxx: Backup

Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
Alexandru Vasile
2023-05-25 09:23:50 +03:00
parent 5b15e2d33d
commit 534e0e472d
6 changed files with 211 additions and 19 deletions
+5
View File
@@ -113,6 +113,8 @@ impl BackgroundTask {
}
}
Ok(RpcResponse::Subscription { method, id, result }) => {
println!(" BACKRGOUND response {result:?}\n");
// Subxt calls into `author_submitAndWatchExtrinsic`, however the smoldot produces
// `{"event":"broadcasted","numPeers":1}` which is part of the RPC V2 API. Ignore
// this spurious event.
@@ -131,6 +133,9 @@ impl BackgroundTask {
"Cannot send notification to subscription {:?}",
id
);
// Remove the sender if the subscription dropped the receiver.
self.subscriptions.remove(&id);
}
return;
}
+4
View File
@@ -509,7 +509,11 @@ pub enum FollowEvent<Hash> {
#[serde(rename_all = "camelCase")]
pub struct ChainHeadResult<T> {
/// Result of the method.
#[cfg(not(feature = "experimental-light-client"))]
pub result: T,
/// Result of the method.
#[cfg(feature = "experimental-light-client")]
pub value: Vec<T>,
}
/// The event generated by the body / call / storage methods.