neo-go/pkg/vm
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
..
cli vm: make NewBigInteger accept int64 2020-03-24 11:10:56 +03:00
emit emit: implement AppCallWithOperationAndArgs 2020-03-27 11:05:36 +03:00
opcode vm: move opcodes into their own package 2019-12-03 18:22:14 +03:00
testdata vm: implement json tests from neoVM 2019-11-06 16:22:56 +03:00
context.go Merge pull request #746 from nspcc-dev/fix/equal 2020-03-12 11:46:51 +03:00
contract_checks.go vm: implement ParseMultisigContract() 2020-03-05 09:43:14 +03:00
contract_checks_test.go *: move all packages from CityOfZion to nspcc-dev 2020-03-03 17:21:42 +03:00
interop.go vm: make SerializeItem/DeserializeItem public APIs 2020-02-07 15:34:59 +03:00
interop_iterators.go vm: implement Neo.Iterator.* interops 2019-12-24 10:21:47 +03:00
json_test.go vm: add support for dynamic invocations in APPCALL 2020-03-10 17:17:36 +03:00
serialization.go vm: make map serialization more compatible with C# 2020-03-28 17:25:42 +03:00
stack.go vm: add TryBytes() to StackItem interface 2020-03-11 16:33:46 +03:00
stack_item.go smartcontract: store MapType Parameter as a slice of KV pairs 2020-04-01 19:21:00 +03:00
stack_item_test.go smartcontract: store MapType Parameter as a slice of KV pairs 2020-04-01 19:21:00 +03:00
stack_test.go vm: allow to push integer-like items to stack 2020-03-18 12:58:31 +03:00
state.go fix spelling and godoc comments 2019-10-22 17:56:03 +03:00
state_test.go Code refactoring (#143) 2019-02-19 14:22:33 +01:00
vm.go vm: fix offset for CALLI opcode 2020-03-26 13:09:55 +03:00
vm_test.go vm: make map serialization more compatible with C# 2020-03-28 17:25:42 +03:00