Skip to content

Commit

Permalink
core/native: fix VotersCount zero value encoding
Browse files Browse the repository at this point in the history
Empty byte array is enough to be bigint value of zero. Fixes state differences
with C# node.
  • Loading branch information
roman-khimov committed Aug 10, 2020
1 parent 98888de commit f287681
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/core/native/native_neo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit f287681

Please sign in to comment.