mirror of
https://github.com/kvazar-network/kevacoin.git
synced 2025-01-11 15:48:05 +00:00
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 in3858aabbd0
. Friendly ping @jnewbery :-) * Remove unused imports. Tree-SHA512: 840c5623eae9f929561f6e86816883c5904ec1af82fc8d5e56dee1c0b1fe22e8600c10f7358ed8b556b3aec8c65c4910f6eee30e8015a573c4df8bef91124d3e
This commit is contained in:
commit
a89221873a
@ -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
|
||||||
|
@ -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):
|
||||||
|
@ -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…
Reference in New Issue
Block a user