ise-ethereum / on-chain-chess

Play decentralised chess on the Ethereum blockchain!
MIT License
214 stars 41 forks source link

Bugfix/add game id to hash of game state closes #165 #174

Closed lisasi closed 8 years ago

lisasi commented 8 years ago

The signature of a game state needs to contain the gameID, otherwise the signed game state could wrongly be used in a different game.

Description

The hash used for signing is now calculated based on the state AND the gameID. The tests are changed accordingly.

Related Issue

165 Add gameID to hash of game state

Motivation and Context

Without this change, this could be a possible way to cheat in a game.

How Has This Been Tested?

Transformed tests accordingly.

Types of changes