mirror of
https://github.com/logos-blockchain/logos-blockchain-testing.git
synced 2026-04-01 16:53:06 +00:00
Reduce source-mode leakage in run context
This commit is contained in:
parent
743e31fa3c
commit
034e56efa5
@ -1,10 +1,7 @@
|
|||||||
use std::{sync::Arc, time::Duration};
|
use std::{sync::Arc, time::Duration};
|
||||||
|
|
||||||
use super::{metrics::Metrics, node_clients::ClusterClient};
|
use super::{metrics::Metrics, node_clients::ClusterClient};
|
||||||
use crate::scenario::{
|
use crate::scenario::{Application, ClusterWaitHandle, DynError, NodeClients, NodeControlHandle};
|
||||||
Application, BorrowedNode, ClusterWaitHandle, DynError, ManagedNode, NodeClients,
|
|
||||||
NodeControlHandle,
|
|
||||||
};
|
|
||||||
|
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
enum RunContextCapabilityError {
|
enum RunContextCapabilityError {
|
||||||
@ -71,26 +68,6 @@ impl<E: Application> RunContext<E> {
|
|||||||
self.node_clients.random_client()
|
self.node_clients.random_client()
|
||||||
}
|
}
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub fn managed_nodes(&self) -> Vec<ManagedNode<E>> {
|
|
||||||
self.node_clients.managed_nodes()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub fn borrowed_nodes(&self) -> Vec<BorrowedNode<E>> {
|
|
||||||
self.node_clients.borrowed_nodes()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub fn find_managed_node(&self, identity: &str) -> Option<ManagedNode<E>> {
|
|
||||||
self.node_clients.find_managed(identity)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[must_use]
|
|
||||||
pub fn find_borrowed_node(&self, identity: &str) -> Option<BorrowedNode<E>> {
|
|
||||||
self.node_clients.find_borrowed(identity)
|
|
||||||
}
|
|
||||||
|
|
||||||
#[must_use]
|
#[must_use]
|
||||||
pub fn feed(&self) -> <E::FeedRuntime as super::FeedRuntime>::Feed {
|
pub fn feed(&self) -> <E::FeedRuntime as super::FeedRuntime>::Feed {
|
||||||
self.feed.clone()
|
self.feed.clone()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user