Skip to content

Commit

Permalink
Refuse to use templates specifying a version older than the one we wi…
Browse files Browse the repository at this point in the history
…ll use to build blocks
  • Loading branch information
luke-jr committed Jul 5, 2015
1 parent 649209f commit 6ce65de
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions merklemaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,10 @@ def _updateMerkleTree_fromTS(self, TS):
newMerkleTree.source = TS['name']
newMerkleTree.source_uri = TS['uri']

if MP['version'] < self.BlockVersion:
self.logger.error('Template from \'%s\' has too low block version (%u < %u)' % (TS['name'], MP['version'], self.BlockVersion))
return None

(AcceptedScore, TotalScore) = self._CheckTemplate(newMerkleTree, TS)

AcceptRatio = AcceptedScore / TotalScore
Expand Down

0 comments on commit 6ce65de

Please sign in to comment.