Skip to content

Commit

Permalink
travis change filler hash calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
winsvega committed Sep 25, 2018
1 parent 7b4c434 commit dcf954d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def validateTestFile(testFile):
def hashFile(fname):
with open(fname ,"rb") as f:
k = sha3.keccak_256()
k.update(f.read())
k.update(json.dumps(json.load(f), separators=(',', ':')))
return k.hexdigest()

def checkFilled(jsonFile):
Expand All @@ -152,7 +152,7 @@ def checkFilled(jsonFile):
fillerSource = jsonTest[test]["_info"]["source"]
fillerHash = jsonTest[test]["_info"]["sourceHash"]
if fillerHash != hashFile(fillerSource):
_logerror("Test must be filled:", jsonFile)
_logerror("Filler hash is different:", jsonFile)

# Main
# ====
Expand Down

0 comments on commit dcf954d

Please sign in to comment.