Skip to content

Commit 9a63759

Browse files
committed
avoid using round 0 to be gc prematurely
1 parent dd71cab commit 9a63759

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

.github/workflows/build-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
push:
55
branches: [ "main" ]
66
pull_request:
7-
branches: [ "main", "ax/dkg" ]
7+
branches: [ "main" ]
88

99
env:
1010
CARGO_TERM_COLOR: always

timeboost-sequencer/src/decrypt.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,11 @@ impl Worker {
835835
/// The node will always try to catchup with the help of remote nodes first.
836836
async fn dkg_catchup(&mut self) -> Result<()> {
837837
let req = Protocol::GetRequest(self.current);
838+
// the round number is ignored by the recieving party, but we don't want to give an
839+
// arbitrary value since `gc()` will probably clean it up too early. Thus, we put in
840+
// an estimated round number using the `.oldest_cached_round()`.
838841
self.net
839-
.broadcast(0, serialize(&req)?) // placeholder round value, ignored by receiver
842+
.broadcast(self.oldest_cached_round().u64(), serialize(&req)?)
840843
.await
841844
.map_err(|e| DecrypterError::End(e.into()))?;
842845
Ok(())

0 commit comments

Comments
 (0)