Why I see the same baker in the delegate and the second candidate fields

Written by Martin J. Maddox
Updated 3 years ago

 It is a peculiarity of the smart contract work. It stores only 2 top candidates: a delegate and the second candidate. These candidates may be changed in two cases: someone votes / removes votes for the candidate, and someone makes veto.

In one case, when someone removes his votes from the candidate - the contract doesn't check the current status of all the candidates automatically because it's too expensive. The contract waits for a trigger action when someone votes for the candidate. When it happens, the contract checks the number of votes for this candidate and compares it with the delegate and the second candidate in the storage.  After this check, the contract re-arranges the delegate and the second candidate on the contracts and thus on the front-end in the correct order. So it's a possible situation when you may see the same baker in two fields, because the contract shows not updated info. We know about this display issue and will fix it soon on the front-end side.

Did this answer your question?