aboutsummaryrefslogtreecommitdiff
path: root/test/functional/interface_zmq.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/functional/interface_zmq.py')
-rwxr-xr-xtest/functional/interface_zmq.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/test/functional/interface_zmq.py b/test/functional/interface_zmq.py
index 94fea37090..e59c0f32b3 100755
--- a/test/functional/interface_zmq.py
+++ b/test/functional/interface_zmq.py
@@ -10,7 +10,6 @@ from test_framework.test_framework import BitcoinTestFramework
from test_framework.messages import CTransaction
from test_framework.util import (
assert_equal,
- bytes_to_hex_str,
hash256,
)
from io import BytesIO
@@ -94,17 +93,17 @@ class ZMQTest (BitcoinTestFramework):
tx = CTransaction()
tx.deserialize(BytesIO(hex))
tx.calc_sha256()
- assert_equal(tx.hash, bytes_to_hex_str(txid))
+ assert_equal(tx.hash, txid.hex())
# Should receive the generated block hash.
- hash = bytes_to_hex_str(self.hashblock.receive())
+ hash = self.hashblock.receive().hex()
assert_equal(genhashes[x], hash)
# The block should only have the coinbase txid.
- assert_equal([bytes_to_hex_str(txid)], self.nodes[1].getblock(hash)["tx"])
+ assert_equal([txid.hex()], self.nodes[1].getblock(hash)["tx"])
# Should receive the generated raw block.
block = self.rawblock.receive()
- assert_equal(genhashes[x], bytes_to_hex_str(hash256(block[:80])))
+ assert_equal(genhashes[x], hash256(block[:80]).hex())
if self.is_wallet_compiled():
self.log.info("Wait for tx from second node")
@@ -113,11 +112,11 @@ class ZMQTest (BitcoinTestFramework):
# Should receive the broadcasted txid.
txid = self.hashtx.receive()
- assert_equal(payment_txid, bytes_to_hex_str(txid))
+ assert_equal(payment_txid, txid.hex())
# Should receive the broadcasted raw transaction.
hex = self.rawtx.receive()
- assert_equal(payment_txid, bytes_to_hex_str(hash256(hex)))
+ assert_equal(payment_txid, hash256(hex).hex())
self.log.info("Test the getzmqnotifications RPC")