Commit b4f2f222 authored by masala's avatar masala

return to stateBootstrap and retry consensus fetch

If the authority waits until the next descriptor submission deadline,
it may miss retrieving the consensus made in the previous epoch and will
not have a copy of the previous consensus from which to inherit the
correct topology. This commit fixes this issue by returning to
stateBootstrap and retrying a consensus fetch for the current epoch.
parent 91415400
......@@ -149,14 +149,15 @@ func (s *state) fsm() <-chan time.Time {
s.backgroundFetchConsensus(epoch)
if elapsed > mixPublishDeadline {
s.log.Debugf("Too late to vote this round, sleeping until %s", nextEpoch)
sleep = nextEpoch + mixPublishDeadline
sleep = nextEpoch
s.votingEpoch = epoch + 2
s.state = stateBootstrap
} else {
s.votingEpoch = epoch + 1
sleep = mixPublishDeadline - elapsed
s.state = stateAcceptDescriptor
}
s.log.Debugf("Bootstrapping for %d", s.votingEpoch)
s.state = stateAcceptDescriptor
case stateAcceptDescriptor:
if !s.hasEnoughDescriptors(s.descriptors[s.votingEpoch]) {
s.log.Debugf("Not voting because insufficient descriptors uploaded for epoch %d!", s.votingEpoch)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment