core/native: fix VotersCount zero value encoding

Empty byte array is enough to be bigint value of zero. Fixes state differences
with C# node.
This commit is contained in:
Roman Khimov 2020-08-10 17:07:14 +03:00
parent 98888def16
commit f287681fa7

View file

@ -142,7 +142,7 @@ func (n *NEO) Initialize(ic *interop.Context) error {
}
n.mint(ic, h, big.NewInt(NEOTotalSupply))
err = ic.DAO.PutStorageItem(n.ContractID, []byte{prefixVotersCount}, &state.StorageItem{Value: []byte{0}})
err = ic.DAO.PutStorageItem(n.ContractID, []byte{prefixVotersCount}, &state.StorageItem{Value: []byte{}})
if err != nil {
return err
}