Merge pull request #4671 from nymtech/feature/embedded-ignore-score
make embedded NR/IPR ignore performance of the gateway
This commit is contained in:
@@ -318,6 +318,7 @@ impl<St> Gateway<St> {
|
||||
.with_shutdown(shutdown)
|
||||
.with_custom_gateway_transceiver(Box::new(transceiver))
|
||||
.with_wait_for_gateway(true)
|
||||
.with_minimum_gateway_performance(0)
|
||||
.with_on_start(on_start_tx);
|
||||
|
||||
if let Some(custom_mixnet) = &nr_opts.custom_mixnet_path {
|
||||
@@ -382,6 +383,7 @@ impl<St> Gateway<St> {
|
||||
.with_shutdown(shutdown)
|
||||
.with_custom_gateway_transceiver(Box::new(transceiver))
|
||||
.with_wait_for_gateway(true)
|
||||
.with_minimum_gateway_performance(0)
|
||||
.with_on_start(on_start_tx);
|
||||
|
||||
if let Some(custom_mixnet) = &ip_opts.custom_mixnet_path {
|
||||
|
||||
@@ -36,6 +36,7 @@ impl OnStartData {
|
||||
pub struct IpPacketRouter {
|
||||
#[allow(unused)]
|
||||
config: Config,
|
||||
|
||||
wait_for_gateway: bool,
|
||||
custom_topology_provider: Option<Box<dyn TopologyProvider + Send + Sync>>,
|
||||
custom_gateway_transceiver: Option<Box<dyn GatewayTransceiver + Send + Sync>>,
|
||||
@@ -79,6 +80,12 @@ impl IpPacketRouter {
|
||||
self
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn with_minimum_gateway_performance(mut self, minimum_gateway_performance: u8) -> Self {
|
||||
self.config.base.debug.topology.minimum_gateway_performance = minimum_gateway_performance;
|
||||
self
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
#[allow(unused)]
|
||||
pub fn with_on_start(mut self, on_start: oneshot::Sender<OnStartData>) -> Self {
|
||||
|
||||
@@ -222,6 +222,15 @@ impl NRServiceProviderBuilder {
|
||||
self
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
// this is a false positive, this method is actually called when used as a library
|
||||
// but clippy complains about it when building the binary
|
||||
#[allow(unused)]
|
||||
pub fn with_minimum_gateway_performance(mut self, minimum_gateway_performance: u8) -> Self {
|
||||
self.config.base.debug.topology.minimum_gateway_performance = minimum_gateway_performance;
|
||||
self
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
// this is a false positive, this method is actually called when used as a library
|
||||
// but clippy complains about it when building the binary
|
||||
|
||||
Reference in New Issue
Block a user