Fix some declared but not used

This commit is contained in:
Mamy André-Ratsimbazafy 2019-11-06 11:33:09 +01:00 committed by zah
parent 05362886a9
commit 4e5137011b
1 changed files with 3 additions and 2 deletions

View File

@ -15,9 +15,8 @@ import
yaml, yaml,
# Beacon chain internals # Beacon chain internals
../../beacon_chain/spec/[datatypes, digest], ../../beacon_chain/spec/[datatypes, digest],
../../beacon_chain/ssz, ../../beacon_chain/ssz
# Test utilities # Test utilities
../testutil
# Parsing definitions # Parsing definitions
# ------------------------------------------------------------------------ # ------------------------------------------------------------------------
@ -134,6 +133,7 @@ proc checkVector(sszSubType, dir: string, expectedHash: SSZHashTreeRoot) =
var typeIdent: string var typeIdent: string
var size: int var size: int
let wasMatched = scanf(sszSubType, "vec_$+_$i", typeIdent, size) let wasMatched = scanf(sszSubType, "vec_$+_$i", typeIdent, size)
assert wasMatched
testVector(typeIdent, size) testVector(typeIdent, size)
type BitContainer[N: static int] = BitList[N] or BitArray[N] type BitContainer[N: static int] = BitList[N] or BitArray[N]
@ -147,6 +147,7 @@ proc testBitContainer(T: typedesc[BitContainer], dir: string, expectedHash: SSZH
proc checkBitVector(sszSubType, dir: string, expectedHash: SSZHashTreeRoot) = proc checkBitVector(sszSubType, dir: string, expectedHash: SSZHashTreeRoot) =
var size: int var size: int
let wasMatched = scanf(sszSubType, "bitvec_$i", size) let wasMatched = scanf(sszSubType, "bitvec_$i", size)
assert wasMatched
case size case size
of 1: testBitContainer(BitArray[1], dir, expectedHash) of 1: testBitContainer(BitArray[1], dir, expectedHash)
of 2: testBitContainer(BitArray[2], dir, expectedHash) of 2: testBitContainer(BitArray[2], dir, expectedHash)