mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-07-07 06:17:30 +00:00
Use rayon to speed up subscribe message serializing
This commit is contained in:
@@ -348,8 +348,8 @@ impl Chain {
|
||||
pub fn get_node(&self, id: ChainNodeId) -> Option<&Node> {
|
||||
self.nodes.get(id)
|
||||
}
|
||||
pub fn iter_nodes(&self) -> impl Iterator<Item = (ChainNodeId, &Node)> {
|
||||
self.nodes.iter()
|
||||
pub fn nodes_slice(&self) -> &[Option<Node>] {
|
||||
self.nodes.as_slice()
|
||||
}
|
||||
pub fn label(&self) -> &str {
|
||||
&self.labels.best()
|
||||
|
||||
@@ -286,8 +286,8 @@ impl<'a> StateChain<'a> {
|
||||
pub fn finalized_block(&self) -> &'a Block {
|
||||
self.chain.finalized_block()
|
||||
}
|
||||
pub fn iter_nodes(&self) -> impl Iterator<Item = (ChainNodeId, &'a Node)> + 'a {
|
||||
self.chain.iter_nodes()
|
||||
pub fn nodes_slice(&self) -> &[Option<Node>] {
|
||||
self.chain.nodes_slice()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user