Skip to content

Commit

Permalink
Merge bitcoin#11683: tests: Remove unused mininode functions {ser,des…
Browse files Browse the repository at this point in the history
…er}_int_vector(...). Remove unused imports.

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

Pull request description:

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

Tree-SHA512: 840c5623eae9f929561f6e86816883c5904ec1af82fc8d5e56dee1c0b1fe22e8600c10f7358ed8b556b3aec8c65c4910f6eee30e8015a573c4df8bef91124d3e
  • Loading branch information
MarcoFalke authored and PastaPastaPasta committed Apr 4, 2020
1 parent 6410c2e commit a8f7f72
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
2 changes: 1 addition & 1 deletion test/functional/minchainwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import time

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)
REGTEST_WORK_PER_BLOCK = 2
Expand Down
2 changes: 1 addition & 1 deletion test/functional/p2p-fingerprint.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
p2p_port)
)

class P2PFingerprintTest(BitcoinTestFramework):

Expand Down
16 changes: 0 additions & 16 deletions test/functional/test_framework/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,22 +160,6 @@ def ser_string_vector(l):
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


def deser_dyn_bitset(f, bytes_based):
if bytes_based:
nb = deser_compact_size(f)
Expand Down

0 comments on commit a8f7f72

Please sign in to comment.