mirror of
https://github.com/aljazceru/python-teos.git
synced 2025-12-17 22:24:23 +01:00
Minot simulator updates
This commit is contained in:
@@ -15,14 +15,12 @@ app = Flask(__name__)
|
||||
HOST = 'localhost'
|
||||
PORT = '18443'
|
||||
|
||||
mining_simulator = ZMQPublisher(topic=b'hashblock', feed_protocol=FEED_PROTOCOL, feed_addr=FEED_ADDR,
|
||||
feed_port=FEED_PORT)
|
||||
TIME_BETWEEN_BLOCKS = 10
|
||||
|
||||
mempool = []
|
||||
mined_transactions = {}
|
||||
blocks = {}
|
||||
blockchain = []
|
||||
TIME_BETWEEN_BLOCKS = 10
|
||||
|
||||
|
||||
@app.route('/', methods=['POST'])
|
||||
@@ -185,6 +183,9 @@ def simulate_mining():
|
||||
global mempool, mined_transactions, blocks, blockchain
|
||||
prev_block_hash = None
|
||||
|
||||
mining_simulator = ZMQPublisher(topic=b'hashblock', feed_protocol=FEED_PROTOCOL, feed_addr=FEED_ADDR,
|
||||
feed_port=FEED_PORT)
|
||||
|
||||
while True:
|
||||
block_hash = os.urandom(32).hex()
|
||||
coinbase_tx_hash = os.urandom(32).hex()
|
||||
|
||||
Reference in New Issue
Block a user