mirror of
https://github.com/Instadapp/dsa-governance.git
synced 2024-07-29 22:27:52 +00:00
Change formatting
This commit is contained in:
parent
42b9ce5a83
commit
7b14e3d4ec
|
@ -350,16 +350,16 @@ contract Token {
|
|||
}
|
||||
|
||||
function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal {
|
||||
uint32 blockNumber = safe32(block.number, "Tkn::_writeCheckpoint: block number exceeds 32 bits");
|
||||
uint32 blockNumber = safe32(block.number, "Tkn::_writeCheckpoint: block number exceeds 32 bits");
|
||||
|
||||
if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
|
||||
checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
|
||||
} else {
|
||||
checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
|
||||
numCheckpoints[delegatee] = nCheckpoints + 1;
|
||||
}
|
||||
if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
|
||||
checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
|
||||
} else {
|
||||
checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
|
||||
numCheckpoints[delegatee] = nCheckpoints + 1;
|
||||
}
|
||||
|
||||
emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
|
||||
emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user