Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def calculate_hash(self):
- payload = "{}{}{}{}{}".format(self.index,
- self.previous_hash,
- self.timestamp,
- json.dumps(self.payload),
- self.nonce).encode('utf-8')
- return hashlib.sha256(payload).hexdigest()
Add Comment
Please, Sign In to add comment