Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
DaOneLuna committed Jun 15, 2024
1 parent 24ad55a commit 1beeddd
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 12 deletions.
5 changes: 0 additions & 5 deletions servers/src/websocket/farmer/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,16 +131,11 @@ impl<T: PoolClient + Sized + Sync + Send + 'static, S: Sync + Send + 'static> Fa
}),
Arc::new(RespondSignaturesHandle {
signage_points: shared_state.signage_points.clone(),
quality_to_identifiers: shared_state.quality_to_identifiers.clone(),
proofs_of_space: shared_state.proofs_of_space.clone(),
cache_time: shared_state.cache_time.clone(),
pool_public_keys: shared_state.pool_public_keys.clone(),
farmer_private_keys: shared_state.farmer_private_keys.clone(),
owner_secret_keys: shared_state.owner_secret_keys.clone(),
pool_state: shared_state.pool_states.clone(),
full_node_client: full_node_client.clone(),
config,
headers: additional_headers.clone(),
#[cfg(feature = "metrics")]
metrics: shared_state.metrics.clone(),
}),
Expand Down
8 changes: 1 addition & 7 deletions servers/src/websocket/farmer/respond_signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use dg_xch_core::consensus::constants::{CONSENSUS_CONSTANTS_MAP, MAINNET};
#[cfg(feature = "metrics")]
use dg_xch_core::protocols::farmer::FarmerMetrics;
use dg_xch_core::protocols::farmer::{
DeclareProofOfSpace, FarmerIdentifier, FarmerPoolState, NewSignagePoint, ProofsMap,
DeclareProofOfSpace, NewSignagePoint, ProofsMap,
SignedValues,
};
use dg_xch_core::protocols::harvester::RespondSignatures;
Expand All @@ -23,21 +23,15 @@ use log::{debug, error, info, warn};
use std::collections::HashMap;
use std::io::{Cursor, Error, ErrorKind};
use std::sync::Arc;
use std::time::Instant;
use tokio::sync::RwLock;

pub struct RespondSignaturesHandle<T> {
pub signage_points: Arc<RwLock<HashMap<Bytes32, Vec<NewSignagePoint>>>>,
pub quality_to_identifiers: Arc<RwLock<HashMap<Bytes32, FarmerIdentifier>>>,
pub proofs_of_space: ProofsMap,
pub cache_time: Arc<RwLock<HashMap<Bytes32, Instant>>>,
pub pool_public_keys: Arc<HashMap<Bytes48, SecretKey>>,
pub farmer_private_keys: Arc<HashMap<Bytes48, SecretKey>>,
pub owner_secret_keys: Arc<HashMap<Bytes48, SecretKey>>,
pub pool_state: Arc<RwLock<HashMap<Bytes32, FarmerPoolState>>>,
pub full_node_client: Arc<RwLock<Option<FarmerClient<T>>>>,
pub config: Arc<FarmerServerConfig>,
pub headers: Arc<HashMap<String, String>>,
#[cfg(feature = "metrics")]
pub metrics: Arc<RwLock<Option<FarmerMetrics>>>,
}
Expand Down

0 comments on commit 1beeddd

Please sign in to comment.