Port PR93 from @denioD

This commit is contained in:
Duke Leto
2020-03-07 13:55:12 -05:00
parent 21ec2e7260
commit a2b3316664
18 changed files with 186 additions and 106 deletions

View File

@@ -37,15 +37,6 @@ class ZMQTest(BitcoinTestFramework):
self.sync_all()
print "listen..."
msg = self.zmqSubSocket.recv_multipart()
topic = msg[0]
assert_equal(topic, b"hashtx")
body = msg[1]
nseq = msg[2]
[nseq] # hush pyflakes
msgSequence = struct.unpack('<I', msg[-1])[-1]
assert_equal(msgSequence, 0) # must be sequence 0 on hashtx
msg = self.zmqSubSocket.recv_multipart()
topic = msg[0]
body = msg[1]
@@ -55,6 +46,15 @@ class ZMQTest(BitcoinTestFramework):
assert_equal(genhashes[0], blkhash) #blockhash from generate must be equal to the hash received over zmq
msg = self.zmqSubSocket.recv_multipart()
topic = msg[0]
assert_equal(topic, b"hashtx")
body = msg[1]
nseq = msg[2]
[nseq] # hush pyflakes
msgSequence = struct.unpack('<I', msg[-1])[-1]
assert_equal(msgSequence, 0) # must be sequence 0 on hashtx
n = 10
genhashes = self.nodes[1].generate(n)
self.sync_all()