Skip to content

Commit

Permalink
Remove clone
Browse files Browse the repository at this point in the history
  • Loading branch information
howardwu committed Jul 9, 2023
1 parent 8194e9f commit f4e56a4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ wasm/Cargo.lock
**.ledger-*
validator-*
**.bft-storage-*/
**proptest-regressions/
1 change: 0 additions & 1 deletion node/narwhal/src/helpers/proposal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ use snarkvm::{
use indexmap::IndexMap;
use std::collections::HashMap;

#[derive(Clone, Debug)]
pub struct Proposal<N: Network> {
/// The committee for the round.
committee: Committee<N>,
Expand Down
4 changes: 2 additions & 2 deletions node/narwhal/src/primary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ impl<N: Network> Primary<N> {
}

/// Returns the batch proposal of our primary, if one currently exists.
pub fn batch_proposal(&self) -> Option<Proposal<N>> {
self.proposed_batch.read().clone()
pub fn batch_proposal(&self) -> &Arc<RwLock<Option<Proposal<N>>>> {
&self.proposed_batch
}
}

Expand Down

0 comments on commit f4e56a4

Please sign in to comment.