cleaned code

This commit is contained in:
Daxeel Soni 2018-01-29 17:47:53 +05:30
parent 6221f3655a
commit d654818725
1 changed files with 3 additions and 0 deletions

View File

@ -3,6 +3,7 @@ import datetime
import json
from colorama import Fore, Back, Style
import time
import sys
# index, timestamp, previousHash, blockHash, data
@ -26,6 +27,8 @@ class Block:
while self.hash[:difficulty] != "0"*difficulty:
self.nonce += 1
self.hash = self.calculateHash()
sys.stdout.write(self.hash)
sys.stdout.flush()
endTime = time.time()
print Back.BLUE + "[ Info ] Time Elapsed : " + str(endTime - startTime) + " seconds."