mirror of
https://github.com/aljazceru/python-teos.git
synced 2026-02-01 12:44:25 +01:00
Updates os.urandom to python3
All string generated with urandom(x) were using binascii + os.urandom + encode. In python3 os.urandom has a hex method.
This commit is contained in:
@@ -172,8 +172,8 @@ def simulate_mining():
|
||||
prev_block_hash = None
|
||||
|
||||
while True:
|
||||
block_hash = binascii.hexlify(os.urandom(32)).decode('utf-8')
|
||||
coinbase_tx_hash = binascii.hexlify(os.urandom(32)).decode('utf-8')
|
||||
block_hash = os.urandom(32).hex()
|
||||
coinbase_tx_hash = os.urandom(32).hex()
|
||||
txs_to_mine = [coinbase_tx_hash]
|
||||
|
||||
if len(mempool) != 0:
|
||||
|
||||
Reference in New Issue
Block a user