Skip to content

Commit b09090e

Browse files
committed
Early epoch end:
Only send disconnect reports if Nodes have been seen as unconnected for longer than 60 minutes. DMDcoin#87 + early returning if that hour did not even had passed yet.
1 parent 42efb63 commit b09090e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

crates/ethcore/src/engines/hbbft/hbbft_early_epoch_end_manager.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,12 @@ impl HbbftEarlyEpochEndManager {
288288
// todo: read this out from contracts: ConnectivityTrackerHbbft -> reportDisallowPeriod
289289
// requires us to update the Contracts ABIs:
290290
// https://github.com/DMDcoin/diamond-node/issues/115
291-
let treshold_time = Duration::from_secs(60 * 15);
291+
let treshold_time = Duration::from_secs(60 * 60);
292+
293+
if self.start_time.elapsed() < treshold_time {
294+
debug!(target: "engine", "early-epoch-end: no decision: Treshold time not reached.");
295+
return;
296+
}
292297

293298
if block_num < self.start_block + treshold {
294299
// not enought blocks have passed this epoch,

0 commit comments

Comments
 (0)