(node_factory)
| 647 | @pytest.mark.openchannel('v1') |
| 648 | @pytest.mark.openchannel('v2') |
| 649 | def test_reconnect_signed(node_factory): |
| 650 | # This will fail *after* both sides consider channel opening. |
| 651 | if EXPERIMENTAL_DUAL_FUND: |
| 652 | # Definitely in DUALOPEND_OPEN_COMMITTED once it's trying to send this. |
| 653 | l1 = node_factory.get_node(may_reconnect=True) |
| 654 | l2 = node_factory.get_node(may_reconnect=True, disconnect=['-WIRE_TX_SIGNATURES']) |
| 655 | else: |
| 656 | l1 = node_factory.get_node(may_reconnect=True, disconnect=['<WIRE_FUNDING_SIGNED']) |
| 657 | l2 = node_factory.get_node(may_reconnect=True) |
| 658 | |
| 659 | l1.fundwallet(2000000) |
| 660 | |
| 661 | l1.rpc.connect(l2.info['id'], 'localhost', l2.port) |
| 662 | l1.rpc.fundchannel(l2.info['id'], CHANNEL_SIZE) |
| 663 | |
| 664 | # They haven't forgotten each other. |
| 665 | assert l1.rpc.getpeer(l2.info['id'])['id'] == l2.info['id'] |
| 666 | assert l2.rpc.getpeer(l1.info['id'])['id'] == l1.info['id'] |
| 667 | |
| 668 | # Technically, this is async to fundchannel (and could reconnect first) |
| 669 | if EXPERIMENTAL_DUAL_FUND: |
| 670 | l1.daemon.wait_for_logs(['sendrawtx exit 0', |
| 671 | 'Peer has reconnected, state DUALOPEND_OPEN_COMMITTED']) |
| 672 | else: |
| 673 | l1.daemon.wait_for_logs(['sendrawtx exit 0', |
| 674 | 'Peer has reconnected, state CHANNELD_AWAITING_LOCKIN']) |
| 675 | |
| 676 | l1.bitcoin.generate_block(6) |
| 677 | |
| 678 | l1.daemon.wait_for_log(' to CHANNELD_NORMAL') |
| 679 | l2.daemon.wait_for_log(' to CHANNELD_NORMAL') |
| 680 | |
| 681 | |
| 682 | @pytest.mark.skip('needs blackhold support') |
nothing calls this directly
no test coverage detected