Skip to content

Commit fae243f

Browse files
author
MarcoFalke
committed
test: Remove confusing cast to same type (int to int)
1 parent c95784e commit fae243f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/functional/p2p_invalid_messages.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,13 +64,13 @@ def test_buffer(self):
6464
conn = self.nodes[0].add_p2p_connection(P2PDataStore())
6565
# Create valid message
6666
msg = conn.build_message(msg_ping(nonce=12345))
67-
cut_pos = 12 # Chosen at an arbitrary position within the header
67+
cut_pos = 12 # Chosen at an arbitrary position within the header
6868
# Send message in two pieces
69-
before = int(self.nodes[0].getnettotals()['totalbytesrecv'])
69+
before = self.nodes[0].getnettotals()['totalbytesrecv']
7070
conn.send_raw_message(msg[:cut_pos])
7171
# Wait until node has processed the first half of the message
72-
self.wait_until(lambda: int(self.nodes[0].getnettotals()['totalbytesrecv']) != before)
73-
middle = int(self.nodes[0].getnettotals()['totalbytesrecv'])
72+
self.wait_until(lambda: self.nodes[0].getnettotals()['totalbytesrecv'] != before)
73+
middle = self.nodes[0].getnettotals()['totalbytesrecv']
7474
# If this assert fails, we've hit an unlikely race
7575
# where the test framework sent a message in between the two halves
7676
assert_equal(middle, before + cut_pos)

0 commit comments

Comments
 (0)