aboutsummaryrefslogtreecommitdiff
path: root/test/functional/p2p_invalid_messages.py
diff options
context:
space:
mode:
authorSeleme Topuz <seleme94@hotmail.com>2020-08-17 17:50:47 +0200
committerSeleme Topuz <seleme94@hotmail.com>2020-08-26 18:01:59 +0200
commit1343c86c7cc1fc896696b3ed87c12039e4ef3a0c (patch)
tree0e98164b74d0549a90de162226c36b677b7e8846 /test/functional/p2p_invalid_messages.py
parent93ab136a33e46080c8aa02d59fb7c2a8d03a3387 (diff)
downloadbitcoin-1343c86c7cc1fc896696b3ed87c12039e4ef3a0c.tar.xz
test: Update wait_until usage in tests not to use the one from utils
Replace "wait_until()" usage from utils, with the ones from BitcoinTestFramework and P2PInterface. closes #19080
Diffstat (limited to 'test/functional/p2p_invalid_messages.py')
-rwxr-xr-xtest/functional/p2p_invalid_messages.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py
index 23e573c19a..fe57057a83 100755
--- a/test/functional/p2p_invalid_messages.py
+++ b/test/functional/p2p_invalid_messages.py
@@ -24,7 +24,6 @@ from test_framework.p2p import (
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
- wait_until,
)
VALID_DATA_LIMIT = MAX_PROTOCOL_MESSAGE_LENGTH - 5 # Account for the 5-byte length prefix
@@ -70,7 +69,7 @@ class InvalidMessagesTest(BitcoinTestFramework):
before = int(self.nodes[0].getnettotals()['totalbytesrecv'])
conn.send_raw_message(msg[:cut_pos])
# Wait until node has processed the first half of the message
- wait_until(lambda: int(self.nodes[0].getnettotals()['totalbytesrecv']) != before)
+ self.wait_until(lambda: int(self.nodes[0].getnettotals()['totalbytesrecv']) != before)
middle = int(self.nodes[0].getnettotals()['totalbytesrecv'])
# If this assert fails, we've hit an unlikely race
# where the test framework sent a message in between the two halves