neoneo-go/pkg
Roman Khimov 3dbe549a61 smartcontract: store MapType Parameter as a slice of KV pairs
Fixes #809.

Basically, there are three alternative approaches to fixing it:
 * allowing both []byte and string for ByteArrayType value
   minimal invasion into existing code, but ugly as hell and will probably
   backfire at some point
 * storing string values in ByteArrayType
   incurs quite a number of type conversions (and associated data copying),
   though note that these values are not changed usually, so dynamic
   properties of []byte are almost irrelevant here
 * storing only []byte values in ByteArrayType
   makes it impossible to use them as map keys which can be solved in several
   ways:
   - via an interface (Marshalable)
     which is good, but makes testing and comparing values in general harder,
     because of keys mismatch
   - using serialized Parameter as a key (in a string)
     which will need some additional marshaling/unmarshaling
   - converting MapType from map to a slice of key-value pairs
     not a bad idea as we don't use this map as a map really, the type
     itself is all about input/output for real VM types and this approach is
     also a bit closer to JSON representation of the Map
2020-04-01 19:21:00 +03:00
..
compiler compiler: calculate stack size more precisely 2020-04-01 17:36:19 +03:00
config config: move config.go out of config/ 2020-03-31 17:55:59 +03:00
consensus Merge pull request #810 from nspcc-dev/refactor/config 2020-04-01 10:29:57 +03:00
core Merge pull request #810 from nspcc-dev/refactor/config 2020-04-01 10:29:57 +03:00
crypto testserdes: implement helpers for encode/decode routines 2020-03-27 10:27:46 +03:00
encoding *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
internal random: make use or random package in tests 2020-03-27 10:27:46 +03:00
interop compiler/interop: add missing methods to interop.Iterator 2020-03-26 16:39:10 +03:00
io *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
network Merge pull request #810 from nspcc-dev/refactor/config 2020-04-01 10:29:57 +03:00
rpc Merge pull request #810 from nspcc-dev/refactor/config 2020-04-01 10:29:57 +03:00
smartcontract smartcontract: store MapType Parameter as a slice of KV pairs 2020-04-01 19:21:00 +03:00
util testserdes: implement helpers for encode/decode routines 2020-03-27 10:27:46 +03:00
vm smartcontract: store MapType Parameter as a slice of KV pairs 2020-04-01 19:21:00 +03:00
wallet config: move config.go out of config/ 2020-03-31 17:55:59 +03:00