Files
Nim/tests/ic/mtoffuser.nim
2026-06-25 23:20:34 +02:00

11 lines
402 B
Nim

# Helper for ttypeoffer.nim ("db_immutable" analog): imports the codec (so
# `toSszType(Gwei)` is visible -> perChunk=4) and re-instantiates HA[64,Gwei].
# With the `(toffer …)` fix it reuses mtoffstate's instance instead.
import mtoffssz, mtoffgwei, mtoffcodec, mtoffstate
type StateB* = object
field*: HA[64, Gwei]
proc check*() =
static: doAssert sizeof(StateA) == sizeof(StateB)
echo "ok"