Browse Source

Merge #11683: tests: Remove unused mininode functions {ser,deser}_int_vector(...). Remove unused imports.

f522fb7c9 tests: Remove unused mininode functions deser_int_vector(f) and ser_int_vector(l) (practicalswift)
0f3b752ec Remove unused imports (practicalswift)

Pull request description:

  * Remove unused mininode functions `deser_int_vector(f)` and `ser_int_vector(l)`. Last use removed in 3858aabbd0. Friendly ping @jnewbery :-)
  * Remove unused imports.

Tree-SHA512: 840c5623eae9f929561f6e86816883c5904ec1af82fc8d5e56dee1c0b1fe22e8600c10f7358ed8b556b3aec8c65c4910f6eee30e8015a573c4df8bef91124d3e
0.16
MarcoFalke 7 years ago
parent
commit
a89221873a
No known key found for this signature in database
GPG Key ID: D2EA4850E7528B25
  1. 2
      test/functional/minchainwork.py
  2. 1
      test/functional/p2p-fingerprint.py
  3. 15
      test/functional/test_framework/messages.py

2
test/functional/minchainwork.py

@ -18,7 +18,7 @@ only succeeds past a given node once its nMinimumChainWork has been exceeded.
import time import time
from test_framework.test_framework import BitcoinTestFramework from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import sync_blocks, connect_nodes, assert_equal from test_framework.util import connect_nodes, assert_equal
# 2 hashes required per regtest block (with no difficulty adjustment) # 2 hashes required per regtest block (with no difficulty adjustment)
REGTEST_WORK_PER_BLOCK = 2 REGTEST_WORK_PER_BLOCK = 2

1
test/functional/p2p-fingerprint.py

@ -24,7 +24,6 @@ from test_framework.mininode import (
from test_framework.test_framework import BitcoinTestFramework from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import ( from test_framework.util import (
assert_equal, assert_equal,
p2p_port,
) )
class P2PFingerprintTest(BitcoinTestFramework): class P2PFingerprintTest(BitcoinTestFramework):

15
test/functional/test_framework/messages.py

@ -167,21 +167,6 @@ def ser_string_vector(l):
return r return r
def deser_int_vector(f):
nit = deser_compact_size(f)
r = []
for i in range(nit):
t = struct.unpack("<i", f.read(4))[0]
r.append(t)
return r
def ser_int_vector(l):
r = ser_compact_size(len(l))
for i in l:
r += struct.pack("<i", i)
return r
# Deserialize from a hex string representation (eg from RPC) # Deserialize from a hex string representation (eg from RPC)
def FromHex(obj, hex_string): def FromHex(obj, hex_string):
obj.deserialize(BytesIO(hex_str_to_bytes(hex_string))) obj.deserialize(BytesIO(hex_str_to_bytes(hex_string)))

Loading…
Cancel
Save