forked from TrueCloudLab/neoneo-go
a7457d08a1
This solves two problems: * adds support for shortened SYSCALL form that uses IDs (similar to #434, but for NEO 2.0, supporting both forms), which is important for compatibility with C# node and mainnet chain that uses it from some height * reworks interop plugging to use callbacks rather than appending to the map, these map mangling functions are clearly visible in the VM profiling statistics and we want spawning a VM to be fast, so it makes sense optimizing it. This change moves most of the work to the init() phase making VM setup cheaper. Caveats: * InteropNameToID accepts `[]byte` because that's the thing we have in SYSCALL processing and that's the most often usecase for it, it leads to some conversions in other places but that's acceptable because those are either tests or init() * three getInterop functions are: `getDefaultVMInterop`, `getSystemInterop` and `getNeoInterop` Our 100K (1.4M->1.5M) block import time improves by ~4% with this change. |
||
---|---|---|
.. | ||
state | ||
storage | ||
test_data | ||
transaction | ||
block.go | ||
block_base.go | ||
block_test.go | ||
blockchain.go | ||
blockchain_test.go | ||
blockchainer.go | ||
cacheddao.go | ||
cacheddao_test.go | ||
dao.go | ||
dao_test.go | ||
feer.go | ||
header.go | ||
header_hash_list.go | ||
header_test.go | ||
helper_test.go | ||
interop_neo.go | ||
interop_neo_test.go | ||
interop_system.go | ||
interops.go | ||
mem_pool.go | ||
mem_pool_test.go | ||
prometheus.go | ||
spent_coin_state.go | ||
spent_coin_state_test.go | ||
uint32.go | ||
unspent_coin_state.go | ||
unspent_coint_state_test.go | ||
util.go | ||
util_test.go |