mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-11 14:54:12 +00:00
Fix SSZ typo fieldCaseDisciminator (declared in nim-serialization)
This commit is contained in:
parent
5dc6f60b08
commit
ad55889707
@ -176,8 +176,8 @@ proc fieldInfos*(RecordType: type): seq[tuple[name: string,
|
|||||||
isFixed = isFixedSize(FieldType)
|
isFixed = isFixedSize(FieldType)
|
||||||
fixedSize = when isFixed: fixedPortionSize(FieldType)
|
fixedSize = when isFixed: fixedPortionSize(FieldType)
|
||||||
else: 0
|
else: 0
|
||||||
branchKey = when fieldCaseDisciminator.len == 0: ""
|
branchKey = when fieldCaseDiscriminator.len == 0: ""
|
||||||
else: fieldCaseDisciminator & ":" & $fieldCaseBranches
|
else: fieldCaseDiscriminator & ":" & $fieldCaseBranches
|
||||||
fieldSize = when isFixed: fixedSize
|
fieldSize = when isFixed: fixedSize
|
||||||
else: offsetSize
|
else: offsetSize
|
||||||
|
|
||||||
@ -188,7 +188,7 @@ proc fieldInfos*(RecordType: type): seq[tuple[name: string,
|
|||||||
fieldOffset = val[]
|
fieldOffset = val[]
|
||||||
val[] += fieldSize
|
val[] += fieldSize
|
||||||
do:
|
do:
|
||||||
let parentBranch = nestedUnder.getOrDefault(fieldCaseDisciminator, "")
|
let parentBranch = nestedUnder.getOrDefault(fieldCaseDiscriminator, "")
|
||||||
fieldOffset = offsetInBranch[parentBranch]
|
fieldOffset = offsetInBranch[parentBranch]
|
||||||
offsetInBranch[branchKey] = fieldOffset + fieldSize
|
offsetInBranch[branchKey] = fieldOffset + fieldSize
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user