Skip to content

Commit

Permalink
SCP: properly trigger the startedBallotProtocol callback
Browse files Browse the repository at this point in the history
Old code would only trigger that callback in some but not all cases
  • Loading branch information
MonsieurNicolas committed Mar 6, 2018
1 parent 21b8f28 commit 994460f
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

5 comments on commit 994460f

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from MonsieurNicolas
at MonsieurNicolas@994460f

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging MonsieurNicolas/stellar-core/scpStartBallotProtocolCB = 994460f into auto

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MonsieurNicolas/stellar-core/scpStartBallotProtocolCB = 994460f merged ok, testing candidate = 1909c07

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@latobarita
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 1909c07

Please sign in to comment.