mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-29 13:41:47 +00:00
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