Skip to content

Commit

Permalink
Merge pull request #1586 from MonsieurNicolas/scpStartBallotProtocolCB
Browse files Browse the repository at this point in the history
SCP: properly trigger the startedBallotProtocol callback

Reviewed-by: MonsieurNicolas
  • Loading branch information
latobarita authored Mar 6, 2018
2 parents 488728d + 994460f commit 1909c07
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/scp/BallotProtocol.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ BallotProtocol::bumpState(Value const& value, uint32 n)

if (updated)
{
mSlot.getSCPDriver().startedBallotProtocol(mSlot.getSlotIndex(), newb);
emitCurrentStateStatement();
checkHeardFromQuorum();
}
Expand Down Expand Up @@ -478,6 +477,12 @@ BallotProtocol::bumpToBallot(SCPBallot const& ballot, bool check)
bool gotBumped =
!mCurrentBallot || (mCurrentBallot->counter != ballot.counter);

if (!mCurrentBallot)
{
mSlot.getSCPDriver().startedBallotProtocol(mSlot.getSlotIndex(),
ballot);
}

mCurrentBallot = make_unique<SCPBallot>(ballot);

if (gotBumped)
Expand Down

0 comments on commit 1909c07

Please sign in to comment.