Cleaned code
This commit is contained in:
parent
6aa5eec11a
commit
ab402814e4
|
|
@ -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."
|
||||
|
|
|
|||
Loading…
Reference in New Issue