There are problems with that code:
- explicit casts,
- `ErrConfigNotFound` which is not a part of a public API,
- hand-rolled assertions, even though neo-go already has everything we
need.
So, remove the error, use `stackitem/Item.Try*()` methods for
conversions. Note, that readUint64Config() returns an error if the
parameter is missing. This is likely an error, but this behaviour is
preserved in this PR: `TryInteger()` returns error when applied to
`Null`. By contract, `TryBool()` returns false for `Null`, so this
PR introduces no functional changes.
Refs
|
||
---|---|---|
.. | ||
client | ||
event | ||
metrics | ||
subscriber | ||
timer |