Skip to content

Commit

Permalink
fix: start triple generation and presignature generation when #mine <…
Browse files Browse the repository at this point in the history
… 2 (#460)

* try fix CI

* cargo.lock changes

* fix: start triple generation and presignature generation when #mine < 2

---------

Co-authored-by: Serhii Volovyk <SergeyVolovyk@gmail.com>
  • Loading branch information
ppca and volovyks authored Feb 13, 2024
1 parent 8288f95 commit ef77eb0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions node/src/protocol/cryptography.rs
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ impl CryptographicProtocol for RunningState {
}

let mut triple_manager = self.triple_manager.write().await;
if triple_manager.my_len() < 2 && triple_manager.potential_len() < 10 {
if triple_manager.my_len() < 2 {
triple_manager.generate()?;
}
for (p, msg) in triple_manager.poke().await? {
Expand All @@ -306,7 +306,7 @@ impl CryptographicProtocol for RunningState {
}

let mut presignature_manager = self.presignature_manager.write().await;
if presignature_manager.my_len() < 2 && presignature_manager.potential_len() < 10 {
if presignature_manager.my_len() < 2 {
// To ensure there is no contention between different nodes we are only using triples
// that we proposed. This way in a non-BFT environment we are guaranteed to never try
// to use the same triple as any other node.
Expand Down

0 comments on commit ef77eb0

Please sign in to comment.