This commit is contained in:
Spekulaas
2024-01-03 20:26:37 +01:00
parent cb70a03d81
commit 4db46705fb
2 changed files with 6 additions and 6 deletions

View File

@@ -1,8 +1,7 @@
from SocketUtil import *
import TxBlock as Tx
# import Tx
from TxBlock import TxBlock
from Transaction import Tx
SERVER = 'localhost'
wallet_list = [SERVER]
@@ -14,6 +13,7 @@ def minerServer(my_ip, wallet_list):
# receive 2 transactions
for i in range(10):
newTx = recvObj(miner_server_socket)
print(len(newTx))
if isinstance(newTx, Tx):
tx_list.append(newTx)
print("Received Tx")
@@ -78,7 +78,7 @@ def minerServer(my_ip, wallet_list):
block.find_nonce()
# send that block to each in wallet_list
for wallet in wallet_list:
sendObj(wallet, block)
sendObj(wallet, block, 5006)
return