Moved protocol to network module #2258

Open
anand-skss wants to merge 1 commits from test5 into v0.6
11 changed files with 32 additions and 20 deletions
Showing only changes of commit 48e8f0534c - Show all commits

View File

@ -73,13 +73,13 @@ from six.moves import configparser, http_client, xmlrpc_server
import helper_inbox
import helper_sent
import protocol
import proofofwork
import queues
import shared
import shutdown
import state
import network.protocol as protocol
from addresses import (
addBMIfNotPresent,
decodeAddress,

View File

@ -19,10 +19,10 @@ import helper_msgcoding
import helper_sent
import highlevelcrypto
import l10n
import protocol
import queues
import shared
import state
import network.protocol as protocol
from addresses import (
decodeAddress, decodeVarint,
encodeAddress, encodeVarint, varintDecodeError

View File

@ -20,11 +20,11 @@ import helper_sql
import highlevelcrypto
import l10n
import proofofwork
import protocol
import queues
import shared
import state
import tr
import network.protocol as protocol
from addresses import decodeAddress, decodeVarint, encodeVarint
from bmconfigparser import config
from helper_sql import sqlExecute, sqlQuery

View File

@ -4,8 +4,8 @@ BMObject and it's exceptions.
import logging
import time
import protocol
import state
import protocol
import connectionpool
from network import dandelion_ins
from highlevelcrypto import calculateInventoryHash

View File

@ -13,9 +13,9 @@ import time
# magic imports!
import addresses
import knownnodes
import protocol
import state
import connectionpool
import protocol
from bmconfigparser import config
from queues import invQueue, objectProcessorQueue, portCheckerQueue
from randomtrackingdict import RandomTrackingDict

View File

@ -6,8 +6,8 @@ import logging
import random
import knownnodes
import protocol
import state
import protocol
from bmconfigparser import config
from queues import queue, portCheckerQueue

View File

@ -13,6 +13,7 @@ import time
from binascii import hexlify
from struct import Struct, pack, unpack
try:
import defaults
import highlevelcrypto
import state
@ -21,8 +22,17 @@ from addresses import (
from bmconfigparser import config
from debug import logger
from helper_sql import sqlExecute
from network.node import Peer
from version import softwareVersion
except ImportError:
PeterSurda commented 2024-07-06 16:51:40 +02:00 (Migrated from github.com)
Review

It looks like this isn't the best approach after all. Let's close it for now.

It looks like this isn't the best approach after all. Let's close it for now.
from pybitmessage import defaults, highlevelcrypto, state
from pybitmessage.addresses import (
encodeVarint, decodeVarint, decodeAddress, varintDecodeError)
from pybitmessage.bmconfigparser import config
from pybitmessage.debug import logger
from pybitmessage.helper_sql import sqlExecute
from pybitmessage.version import softwareVersion
from .node import Peer
# Network constants
magic = 0xE9BEB4D9

View File

@ -16,10 +16,10 @@ import threading
import time
import unittest
import protocol
import state
import helper_sent
import helper_addressbook
import network.protocol as protocol
from bmconfigparser import config
from helper_msgcoding import MsgEncode, MsgDecode

View File

@ -7,7 +7,7 @@ from struct import pack
from six.moves import queue, xmlrpc_client
from pybitmessage import protocol
from pybitmessage.network import protocol
from pybitmessage.highlevelcrypto import calculateInventoryHash
from .partial import TestPartialRun

View File

@ -3,7 +3,8 @@
from binascii import unhexlify
from struct import pack
from pybitmessage import addresses, protocol
from pybitmessage import addresses
from pybitmessage.network import protocol
from .samples import (
sample_addr_data, sample_object_data, sample_object_expires)

View File

@ -5,7 +5,8 @@ Tests for common protocol functions
import sys
import unittest
from pybitmessage import protocol, state
from pybitmessage import state
from pybitmessage.network import protocol
from pybitmessage.helper_startup import fixSocket