Fix a stack overflow crash with the mainnet preset

This commit is contained in:
Zahary Karadjov 2020-03-30 21:24:07 +03:00
parent 779349c11d
commit d3e225c461
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
1 changed files with 2 additions and 5 deletions

View File

@ -38,11 +38,8 @@ template runSuite(suiteDir, testName: string, transitionProc: untyped{ident}, us
let unitTestName = testDir.rsplit(DirSep, 1)[1]
timedTest testName & " - " & unitTestName & preset():
var stateRef, postRef: ref BeaconState
new stateRef
new postRef
stateRef[] = parseTest(testDir/"pre.ssz", SSZ, BeaconState)
postRef[] = parseTest(testDir/"post.ssz", SSZ, BeaconState)
let stateRef = parseTest(testDir/"pre.ssz", SSZ, ref BeaconState)
let postRef = parseTest(testDir/"post.ssz", SSZ, ref BeaconState)
when useCache:
var cache = get_empty_per_epoch_cache()