EspressoSystems / HotShot

http://hotshot.docs.espressosys.com/
101 stars 25 forks source link

Fix Improper Gating of `Arc` in Push CDN Network #3327

Closed jparr721 closed 3 weeks ago

jparr721 commented 3 weeks ago

Closes #

This PR:

PR #3323 introduced a breaking change to downstream uses of the PushCdnNetwork struct.

Line 166 onward:

/// A communication channel to the Push CDN, which is a collection of brokers and a marshal
/// that helps organize them all.
#[derive(Clone)]
/// Is generic over both the type of key and the network protocol.
pub struct PushCdnNetwork<TYPES: NodeType> {
    /// The underlying client
    client: Client<ClientDef<TYPES>>,
    /// The CDN-specific metrics
    metrics: Arc<CdnMetricsValue>,
    /// Whether or not the underlying network is supposed to be paused
    #[cfg(feature = "hotshot-testing")]
    is_paused: Arc<AtomicBool>,
}

But, we see the import is improperly gated here:

#[cfg(feature = "hotshot-testing")]
use std::{path::Path, sync::Arc, time::Duration};

This PR hot fixes the Arc type to not be gated off.

This PR does not:

Key places to review: