aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <[email protected]>2020-09-28 10:21:16 +0200
committerMarcoFalke <[email protected]>2020-09-28 10:13:51 +0200
commitfae243f0cb92b5648d07d0a5033e2f4de862ae99 (patch)
tree935154e52ffc894705dc1f4cdf44b8e5abb0a4ba
parentMerge #20016: uint256: 1 is a constant (diff)
downloaddiscoin-fae243f0cb92b5648d07d0a5033e2f4de862ae99.tar.xz
discoin-fae243f0cb92b5648d07d0a5033e2f4de862ae99.zip
test: Remove confusing cast to same type (int to int)
-rwxr-xr-xtest/functional/p2p_invalid_messages.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/functional/p2p_invalid_messages.py b/test/functional/p2p_invalid_messages.py
index fe57057a8..3a8853219 100755
--- a/test/functional/p2p_invalid_messages.py
+++ b/test/functional/p2p_invalid_messages.py
@@ -64,13 +64,13 @@ class InvalidMessagesTest(BitcoinTestFramework):
conn = self.nodes[0].add_p2p_connection(P2PDataStore())
# Create valid message
msg = conn.build_message(msg_ping(nonce=12345))
- cut_pos = 12 # Chosen at an arbitrary position within the header
+ cut_pos = 12 # Chosen at an arbitrary position within the header
# Send message in two pieces
- before = int(self.nodes[0].getnettotals()['totalbytesrecv'])
+ before = self.nodes[0].getnettotals()['totalbytesrecv']
conn.send_raw_message(msg[:cut_pos])
# Wait until node has processed the first half of the message
- self.wait_until(lambda: int(self.nodes[0].getnettotals()['totalbytesrecv']) != before)
- middle = int(self.nodes[0].getnettotals()['totalbytesrecv'])
+ self.wait_until(lambda: self.nodes[0].getnettotals()['totalbytesrecv'] != before)
+ middle = 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
assert_equal(middle, before + cut_pos)