nan01ab
nan01ab
Like this example, the enum has a serde derive `#[serde(tag = "type", content = "value")]`, and `skip_serializing_if` of the second variant not works: version: serde 1.0.197, serde_json 1.0.115 ```rust #[derive(Debug,...
According to the C# Specification, `GetHashCode()` must have some properties, for example: > The [GetHashCode()](https://learn.microsoft.com/en-us/dotnet/api/system.object.gethashcode?view=net-8.0#system-object-gethashcode) method should not throw exceptions. So, `StackItem.GetHasoCode` probably shouldn't throw any Exception. But in current...
There are so many `hash` calculations use `murmur32`, and several duplicate implementations here(in `Neo` and `Neo.VM`) In some cases, there is a large number of hash calculations, and consumes quite...
# Description The `Unsafe.NotZero(ReadOnlySpan)` method in `Neo.VM` use `long*` to load data from `ReadOnlySpan` for better performance, but this approach may result in misaligned memory access. This approach is no...
**Describe the bug** In `SQLiteWallet`, it uses two lock to avoid concurrency problems: * `lock (accounts)` to protect the `accounts` structure; * `lock (db_lock)` to protect the `WalletDataContext`; Because there...
There are several builtin types in Neo-VM, and each type has its own characteristics(about Mutability, Reference or Value). For examples: * Boolean: Immutable * Integer: Immutable * ByteString: Immutable *...
# Description Fix integer overflow in `JumpTable.SubStr ` Fixes #3495 ## Type of change - [ ] Optimization (the change is only an optimization) - [ ] Style (the change...
**Describe the bug** In `JumpTable.SubStr`, if `count` is set to a large int(for example, Int32.MaxValue), `index + count ` may less than 0, and `index + count > x.Length` will...
According to the previous two issues(#1193, #1194), there are some different implementations with C# stdlib on determining a `char` is white space or not(and `string.Trim` and `char.IsWhiteSpace` is different too)....
In `inc` operation, Neo-VM script and standard C# program will throw an Exception both if `src` overflowed: ``` public static int Inc(int src) { return checked(++src); } ``` In `-x`...