Skip to content

Commit 9af27de

Browse files
committed
fixed test for DMDcoin#327 (remove empty blocks during key gen phases behaviour)
1 parent ec3ed17 commit 9af27de

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,6 @@ impl TransitionHandler {
328328

329329
// If the minimum block time has passed we are ready to trigger new blocks.
330330
if timer_duration == Duration::from_secs(0) {
331-
332331
// If the maximum block time has been reached we trigger a new block in any case.
333332
if self.max_block_time_remaining(client.clone()) == Duration::from_secs(0) {
334333
self.engine.start_hbbft_epoch(client);

crates/ethcore/src/engines/hbbft/test/mod.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
use super::{
22
contracts::{
33
staking::{
4-
get_posdao_epoch, start_time_of_next_phase_transition,
4+
get_posdao_epoch,
55
tests::{create_staker, is_pool_active},
66
},
77
validator_set::{is_pending_validator, mining_by_staking_address},
88
},
9-
contribution::unix_now_secs,
109
test::hbbft_test_client::{HbbftTestClient, create_hbbft_client, create_hbbft_clients},
1110
};
1211
use crate::{client::traits::BlockInfo, types::ids::BlockId};
@@ -129,12 +128,6 @@ fn test_epoch_transition() {
129128
// To avoid performing external transactions with the MoC we create and fund a random address.
130129
let transactor: KeyPair = Random.generate();
131130

132-
let genesis_transition_time = start_time_of_next_phase_transition(moc.client.as_ref())
133-
.expect("start_time_of_next_phase_transition call must succeed");
134-
135-
// Genesis block is at time 0, current unix time must be much larger.
136-
assert!(genesis_transition_time.as_u64() < unix_now_secs());
137-
138131
// We should not be in the pending validator set at the genesis block.
139132
assert!(
140133
!is_pending_validator(moc.client.as_ref(), &moc.address())

0 commit comments

Comments
 (0)