This improves the reliability of the switch to offline delivery test by
ensuring only Carol can connect to Dave (and not vice-versa) and that
their connection is up before attempting to complete the final payment.
This is necessary before upstream changes to dcrd's connmgr package
to correctly cancel outstanding connection attempts are merged.
Currently this test fails depending on the exact timings of the code
execution, which might cause the nodes to be disconnected at the exact
time the last payment is attempted. By only allowing connections on the
Carol -> Dave direction, we prevent this situation from arising.
This improves the reliability of the switch to offline delivery test by ensuring only Carol can connect to Dave (and not vice-versa) and that their connection is up before attempting to complete the final payment.
This is necessary before upstream changes to dcrd's connmgr package to correctly cancel outstanding connection attempts are merged.
Currently this test fails depending on the exact timings of the code execution, which might cause the nodes to be disconnected at the exact time the last payment is attempted. By only allowing connections on the Carol -> Dave direction, we prevent this situation from arising.
The relevant upstream commits alluded to in the original message are here: https://github.com/decred/dcrd/pull/1724