aboutsummaryrefslogtreecommitdiff
path: root/test/functional
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional')
-rwxr-xr-xtest/functional/interface_rest.py3
-rwxr-xr-xtest/functional/p2p_message_capture.py6
2 files changed, 4 insertions, 5 deletions
diff --git a/test/functional/interface_rest.py b/test/functional/interface_rest.py
index 2c158e37e7..f36bbda3af 100755
--- a/test/functional/interface_rest.py
+++ b/test/functional/interface_rest.py
@@ -330,6 +330,9 @@ class RESTTest (BitcoinTestFramework):
# the size of the memory pool should be greater than 3x ~100 bytes
assert_greater_than(json_obj['bytes'], 300)
+ mempool_info = self.nodes[0].getmempoolinfo()
+ assert_equal(json_obj, mempool_info)
+
# Check that there are our submitted transactions in the TX memory pool
json_obj = self.test_rest_request("/mempool/contents")
raw_mempool_verbose = self.nodes[0].getrawmempool(verbose=True)
diff --git a/test/functional/p2p_message_capture.py b/test/functional/p2p_message_capture.py
index 0a7ae44de4..87c77f4540 100755
--- a/test/functional/p2p_message_capture.py
+++ b/test/functional/p2p_message_capture.py
@@ -43,12 +43,8 @@ def mini_parser(dat_file):
break
tmp_header = BytesIO(tmp_header_raw)
tmp_header.read(TIME_SIZE) # skip the timestamp field
- raw_msgtype = tmp_header.read(MSGTYPE_SIZE)
- msgtype: bytes = raw_msgtype.split(b'\x00', 1)[0]
- remainder = raw_msgtype.split(b'\x00', 1)[1]
- assert(len(msgtype) > 0)
+ msgtype = tmp_header.read(MSGTYPE_SIZE).rstrip(b'\x00')
assert(msgtype in MESSAGEMAP)
- assert(len(remainder) == 0 or not remainder.decode().isprintable())
length: int = int.from_bytes(tmp_header.read(LENGTH_SIZE), "little")
data = f_in.read(length)
assert_equal(len(data), length)