Roman Khimov
3945e81857
bigint: don't allocate in ToPreallocatedBytes() for negative numbers
...
In-place modifications are somewhat dangerous, but yet another allocation is
quite costly.
2022-05-31 12:45:34 +03:00
Elizaveta Chichindaeva
28908aa3cf
[ #2442 ] English Check
...
Signed-off-by: Elizaveta Chichindaeva <elizaveta@nspcc.ru>
2022-05-04 19:48:27 +03:00
Roman Khimov
418ba1dbc3
*: use internal variables for simple big.NewInt() values
...
Avoid additional allocations.
2021-12-01 21:36:25 +03:00
Roman Khimov
100e97d772
util: move ArrayReverse into package of its own
...
Leave just uint160 and uint256 types in util.
2021-07-19 22:57:55 +03:00
Evgeniy Stratonikov
9c5b4e5916
encoding/bigint: allow to convert unsigned integers
...
Signed-off-by: Evgeniy Stratonikov <evgeniy@nspcc.ru>
2021-07-15 15:58:49 +03:00
Roman Khimov
9d2712573f
*: enable godot linter and fix all its warnings
...
It's important for NeoGo to have clean documentation. No functional changes.
2021-05-12 23:17:03 +03:00
Roman Khimov
b56e028733
*: add more package-specific documentation
...
For the most important packages at least.
2021-03-19 16:18:45 +03:00
Evgeniy Stratonikov
5a3fa47b95
encoding: panic on nil slice
...
After `state.StorageItem` became a slice of bytes
we no longer panic on accessing `si.Value`. This helps
to ensure that nothing was broken. Providing `nil` to `FromBytes`
is probably an error anyway.
2021-03-09 12:11:26 +03:00
Roman Khimov
ff11a5f990
state: use more efficient encoding for amount
...
It's variable-length anyway, so wasting 8 bytes for what typically is 1 byte
makes no sense.
2020-09-21 21:51:33 +03:00
Anna Shaleva
7ca2807875
vm/encoding: move bigint from vm to encoding package
2020-06-08 13:27:13 +03:00