From c47f046823cd6f4d3b85cc040f8588a4e8398a6a Mon Sep 17 00:00:00 2001 From: andrewtoth Date: Wed, 29 May 2019 18:19:27 -0400 Subject: [PATCH] Remove unused code --- electrumpersonalserver/server/peertopeer.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/electrumpersonalserver/server/peertopeer.py b/electrumpersonalserver/server/peertopeer.py index 9b5bd70..0c3dda8 100644 --- a/electrumpersonalserver/server/peertopeer.py +++ b/electrumpersonalserver/server/peertopeer.py @@ -1,6 +1,6 @@ #! /usr/bin/env python -import socket, time, random +import socket, time import base64 from struct import pack, unpack from datetime import datetime @@ -21,9 +21,6 @@ # length of bitcoin p2p packets HEADER_LENGTH = 24 -# how many times to connect to peer before giving up -MAX_CONNECTION_ATTEMPTS = 10 - # if no message has been seen for this many seconds, send a ping KEEPALIVE_INTERVAL = 2 * 60 @@ -174,7 +171,6 @@ def __init__(self, p2p_message_handler, remote_hostport, self.magic = 0xd9b4bef9 self.closed = False - self.connection_attempts = MAX_CONNECTION_ATTEMPTS self.remote_hostport = remote_hostport