mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
Use logging in individual tests
This commit is contained in:
@@ -13,7 +13,6 @@ reach. [0.10 clients shouldn't request more than 16 from a single peer.]
|
||||
from test_framework.mininode import *
|
||||
from test_framework.test_framework import BitcoinTestFramework
|
||||
from test_framework.util import *
|
||||
import logging
|
||||
|
||||
MAX_REQUESTS = 128
|
||||
|
||||
@@ -33,7 +32,6 @@ class TestManager(NodeConnCB):
|
||||
|
||||
def __init__(self):
|
||||
NodeConnCB.__init__(self)
|
||||
self.log = logging.getLogger("BlockRelayTest")
|
||||
|
||||
def add_new_connection(self, connection):
|
||||
self.connection = connection
|
||||
@@ -65,7 +63,7 @@ class TestManager(NodeConnCB):
|
||||
raise AssertionError("Error, test failed: block %064x requested more than once" % key)
|
||||
if total_requests > MAX_REQUESTS:
|
||||
raise AssertionError("Error, too many blocks (%d) requested" % total_requests)
|
||||
print("Round %d: success (total requests: %d)" % (count, total_requests))
|
||||
self.log.info("Round %d: success (total requests: %d)" % (count, total_requests))
|
||||
|
||||
self.disconnectOkay = True
|
||||
self.connection.disconnect_node()
|
||||
|
||||
Reference in New Issue
Block a user