native: use ToPreallocatedBytes
where possible
This commit is contained in:
parent
5a3fa47b95
commit
a737d473fb
1 changed files with 1 additions and 1 deletions
|
@ -804,7 +804,7 @@ func (n *NEO) modifyVoterTurnout(d dao.DAO, amount *big.Int) error {
|
|||
}
|
||||
votersCount := bigint.FromBytes(si)
|
||||
votersCount.Add(votersCount, amount)
|
||||
si = bigint.ToBytes(votersCount)
|
||||
si = bigint.ToPreallocatedBytes(votersCount, si)
|
||||
return d.PutStorageItem(n.ID, key, si)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue