mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 12:17:58 +00:00
Encryption support for the statement store (#14440)
* Added ECIES encryption * tweaks * fmt * Make clippy happy * Use local keystore * qed
This commit is contained in:
@@ -162,7 +162,8 @@ where
|
||||
},
|
||||
};
|
||||
// Keep track of the subscription.
|
||||
let Some(rx_stop) = self.subscriptions.insert_subscription(sub_id.clone(), with_runtime) else {
|
||||
let Some(rx_stop) = self.subscriptions.insert_subscription(sub_id.clone(), with_runtime)
|
||||
else {
|
||||
// Inserting the subscription can only fail if the JsonRPSee
|
||||
// generated a duplicate subscription ID.
|
||||
debug!(target: LOG_TARGET, "[follow][id={:?}] Subscription already accepted", sub_id);
|
||||
|
||||
@@ -339,9 +339,7 @@ where
|
||||
let mut events = Vec::new();
|
||||
|
||||
// Nothing to be done if no finalized hashes are provided.
|
||||
let Some(first_hash) = finalized_block_hashes.get(0) else {
|
||||
return Ok(Default::default())
|
||||
};
|
||||
let Some(first_hash) = finalized_block_hashes.get(0) else { return Ok(Default::default()) };
|
||||
|
||||
// Find the parent header.
|
||||
let Some(first_header) = self.client.header(*first_hash)? else {
|
||||
|
||||
@@ -328,9 +328,7 @@ impl<Block: BlockT, BE: Backend<Block>> SubscriptionsInner<Block, BE> {
|
||||
|
||||
/// Remove the subscription ID with associated pinned blocks.
|
||||
pub fn remove_subscription(&mut self, sub_id: &str) {
|
||||
let Some(mut sub) = self.subs.remove(sub_id) else {
|
||||
return
|
||||
};
|
||||
let Some(mut sub) = self.subs.remove(sub_id) else { return };
|
||||
|
||||
// The `Stop` event can be generated only once.
|
||||
sub.stop();
|
||||
|
||||
Reference in New Issue
Block a user