native: use ToPreallocatedBytes where possible

This commit is contained in:
Evgeniy Stratonikov 2021-03-05 18:21:07 +03:00
parent 5a3fa47b95
commit a737d473fb

View file

@ -804,7 +804,7 @@ func (n *NEO) modifyVoterTurnout(d dao.DAO, amount *big.Int) error {
} }
votersCount := bigint.FromBytes(si) votersCount := bigint.FromBytes(si)
votersCount.Add(votersCount, amount) votersCount.Add(votersCount, amount)
si = bigint.ToBytes(votersCount) si = bigint.ToPreallocatedBytes(votersCount, si)
return d.PutStorageItem(n.ID, key, si) return d.PutStorageItem(n.ID, key, si)
} }