remove unnecessary option
This commit is contained in:
parent
dbf82c2e98
commit
66b4f1ac47
@ -78,40 +78,38 @@ impl IoHandler<Step> for TransitionHandler {
|
|||||||
Step::Propose => {
|
Step::Propose => {
|
||||||
trace!(target: "poa", "timeout: Propose timeout.");
|
trace!(target: "poa", "timeout: Propose timeout.");
|
||||||
set_timeout(io, engine.our_params.timeouts.prevote);
|
set_timeout(io, engine.our_params.timeouts.prevote);
|
||||||
Some(Step::Prevote)
|
Step::Prevote
|
||||||
},
|
},
|
||||||
Step::Prevote if engine.has_enough_any_votes() => {
|
Step::Prevote if engine.has_enough_any_votes() => {
|
||||||
trace!(target: "poa", "timeout: Prevote timeout.");
|
trace!(target: "poa", "timeout: Prevote timeout.");
|
||||||
set_timeout(io, engine.our_params.timeouts.precommit);
|
set_timeout(io, engine.our_params.timeouts.precommit);
|
||||||
Some(Step::Precommit)
|
Step::Precommit
|
||||||
},
|
},
|
||||||
Step::Prevote => {
|
Step::Prevote => {
|
||||||
trace!(target: "poa", "timeout: Prevote timeout without enough votes.");
|
trace!(target: "poa", "timeout: Prevote timeout without enough votes.");
|
||||||
set_timeout(io, engine.our_params.timeouts.precommit);
|
set_timeout(io, engine.our_params.timeouts.prevote);
|
||||||
Some(Step::Prevote)
|
Step::Prevote
|
||||||
},
|
},
|
||||||
Step::Precommit if engine.has_enough_any_votes() => {
|
Step::Precommit if engine.has_enough_any_votes() => {
|
||||||
trace!(target: "poa", "timeout: Precommit timeout.");
|
trace!(target: "poa", "timeout: Precommit timeout.");
|
||||||
set_timeout(io, engine.our_params.timeouts.propose);
|
set_timeout(io, engine.our_params.timeouts.propose);
|
||||||
engine.increment_round(1);
|
engine.increment_round(1);
|
||||||
Some(Step::Propose)
|
Step::Propose
|
||||||
},
|
},
|
||||||
Step::Precommit => {
|
Step::Precommit => {
|
||||||
trace!(target: "poa", "timeout: Precommit timeout without enough votes.");
|
trace!(target: "poa", "timeout: Precommit timeout without enough votes.");
|
||||||
set_timeout(io, engine.our_params.timeouts.propose);
|
set_timeout(io, engine.our_params.timeouts.precommit);
|
||||||
Some(Step::Precommit)
|
Step::Precommit
|
||||||
},
|
},
|
||||||
Step::Commit => {
|
Step::Commit => {
|
||||||
trace!(target: "poa", "timeout: Commit timeout.");
|
trace!(target: "poa", "timeout: Commit timeout.");
|
||||||
set_timeout(io, engine.our_params.timeouts.propose);
|
set_timeout(io, engine.our_params.timeouts.propose);
|
||||||
engine.reset_round();
|
engine.reset_round();
|
||||||
Some(Step::Propose)
|
Step::Propose
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
if let Some(step) = next_step {
|
engine.to_step(next_step)
|
||||||
engine.to_step(step)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user