Browse Source

Improving imports (#4448)

3.2.x
Francisco J. Hernandez Heras 7 years ago
committed by ghost43
parent
commit
469565c188
  1. 4
      lib/blockchain.py
  2. 6
      lib/network.py
  3. 2
      lib/verifier.py

4
lib/blockchain.py

@ -24,9 +24,9 @@ import os
import threading import threading
from . import util from . import util
from . import bitcoin from .bitcoin import Hash, hash_encode, int_to_hex, rev_hex
from . import constants from . import constants
from .bitcoin import * from .util import bfh, bh2u
MAX_TARGET = 0x00000000FFFF0000000000000000000000000000000000000000000000000000 MAX_TARGET = 0x00000000FFFF0000000000000000000000000000000000000000000000000000

6
lib/network.py

@ -23,7 +23,6 @@
import time import time
import queue import queue
import os import os
import stat
import errno import errno
import random import random
import re import re
@ -40,7 +39,7 @@ import socks
from . import util from . import util
from . import bitcoin from . import bitcoin
from .bitcoin import * from .bitcoin import COIN
from . import constants from . import constants
from .interface import Connection, Interface from .interface import Connection, Interface
from . import blockchain from . import blockchain
@ -54,7 +53,6 @@ SERVER_RETRY_INTERVAL = 10
def parse_servers(result): def parse_servers(result):
""" parse servers list into dict format""" """ parse servers list into dict format"""
from .version import PROTOCOL_VERSION
servers = {} servers = {}
for item in result: for item in result:
host = item[1] host = item[1]
@ -983,7 +981,7 @@ class Network(util.DaemonThread):
def on_notify_header(self, interface, header_dict): def on_notify_header(self, interface, header_dict):
header_hex, height = header_dict['hex'], header_dict['height'] header_hex, height = header_dict['hex'], header_dict['height']
header = blockchain.deserialize_header(bfh(header_hex), height) header = blockchain.deserialize_header(util.bfh(header_hex), height)
if height < self.max_checkpoint(): if height < self.max_checkpoint():
self.connection_down(interface.server) self.connection_down(interface.server)
return return

2
lib/verifier.py

@ -21,7 +21,7 @@
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE. # SOFTWARE.
from .util import ThreadJob from .util import ThreadJob
from .bitcoin import * from .bitcoin import Hash, hash_decode, hash_encode
class SPV(ThreadJob): class SPV(ThreadJob):

Loading…
Cancel
Save