Skip to content
This repository was archived by the owner on Jul 15, 2022. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/codes/updater.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from .minermanager import am_i_in_current_committee, broadcast_miner_update, get_miner_for_current_block, should_i_mine
from ..nvalues import TREASURY_WALLET_ADDRESS
from ..constants import ALLOWED_FEE_PAYMENT_TOKENS, BLOCK_RECEIVE_TIMEOUT_SECONDS, BLOCK_TIME_INTERVAL_SECONDS, IS_TEST, NEWRL_DB, NEWRL_PORT, NO_RECEIPT_COMMITTEE_TIMEOUT, REQUEST_TIMEOUT, MEMPOOL_PATH, TIME_BETWEEN_BLOCKS_SECONDS, TIME_MINER_BROADCAST_INTERVAL
from .p2p.peers import get_peers
from .p2p.peers import get_peers, remove_peer
from .p2p.utils import is_my_address
from .utils import BufferedLog, get_time_ms
from .blockchain import Blockchain
Expand Down Expand Up @@ -164,6 +164,8 @@ def broadcast_block(block):
# requests.post(url + '/receive-block', json={'block': block_payload}, timeout=REQUEST_TIMEOUT)
except Exception as e:
print(f'Error broadcasting block to peer: {url}')
print(f'Delete peer {peer}')
remove_peer(peer)
print(e)
return True

Expand Down