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

Method test_multiple_interfaces

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

Source from the content-addressed store, hash-verified

549 self.generatetoaddress(self.nodes[0], 1, ADDRESS_BCRT1_UNSPENDABLE)
550
551 def test_multiple_interfaces(self):
552 # Set up two subscribers with different addresses
553 # (note that after the reorg test, syncing would fail due to different
554 # chain lengths on node0 and node1; for this test we only need node0, so
555 # we can disable syncing blocks on the setup)
556 subscribers = self.setup_zmq_test([
557 ("hashblock", "tcp://127.0.0.1:28334"),
558 ("hashblock", "tcp://127.0.0.1:28335"),
559 ], sync_blocks=False)
560
561 # Generate 1 block in nodes[0] and receive all notifications
562 self.generatetoaddress(self.nodes[0], 1, ADDRESS_BCRT1_UNSPENDABLE, sync_fun=self.no_op)
563
564 # Should receive the same block hash on both subscribers
565 assert_equal(self.nodes[0].getbestblockhash(), subscribers[0].receive().hex())
566 assert_equal(self.nodes[0].getbestblockhash(), subscribers[1].receive().hex())
567
568 def test_ipv6(self):
569 if not test_ipv6_local():

Callers 1

run_testMethod · 0.95

Calls 5

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

Tested by

no test coverage detected