MCPcopy Create free account
hub / github.com/ElementsProject/elements / test_ipv6

Method test_ipv6

test/functional/interface_zmq.py:568–582  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

566 assert_equal(self.nodes[0].getbestblockhash(), subscribers[1].receive().hex())
567
568 def test_ipv6(self):
569 if not test_ipv6_local():
570 self.log.info("Skipping IPv6 test, because IPv6 is not supported.")
571 return
572 self.log.info("Testing IPv6")
573 # Set up subscriber using IPv6 loopback address
574 subscribers = self.setup_zmq_test([
575 ("hashblock", "tcp://[::1]:28332")
576 ], ipv6=True)
577
578 # Generate 1 block in nodes[0]
579 self.generatetoaddress(self.nodes[0], 1, ADDRESS_BCRT1_UNSPENDABLE)
580
581 # Should receive the same block hash
582 assert_equal(self.nodes[0].getbestblockhash(), subscribers[0].receive().hex())
583
584
585if __name__ == '__main__':

Callers 1

run_testMethod · 0.95

Calls 7

setup_zmq_testMethod · 0.95
test_ipv6_localFunction · 0.90
assert_equalFunction · 0.90
infoMethod · 0.80
hexMethod · 0.80
generatetoaddressMethod · 0.45
receiveMethod · 0.45

Tested by

no test coverage detected