]> git.bitcoin.ninja Git - rust-lightning/commit
Delay broadcasting Channel Updates until connected to peers
authorshaavan <shaavan.github@gmail.com>
Wed, 27 Mar 2024 13:03:42 +0000 (18:33 +0530)
committershaavan <shaavan.github@gmail.com>
Tue, 2 Apr 2024 15:09:51 +0000 (20:39 +0530)
commit6647bff344f5f476b8b279c8756db3e65d5405a1
tree7d2fdf2054f1eac7ec2692511d8bb722950b390f
parent5bf58f0d33b13bd3d9f88c4f2021fbd77745274a
Delay broadcasting Channel Updates until connected to peers

    - We might generate channel updates to be broadcast when
      we are not connected to any peers to broadcast them to.
    - This PR ensures to cache them and broadcast them only when
      we are connected to some peers.

Other Changes:
    1. Introduce a test.
    2. Update the relevant current tests affected by this change.
    3. Fix a typo.
    4. Introduce two functions in functional_utils that optionally
       connect and disconnect a dummy node during broadcast testing.
lightning/src/ln/channelmanager.rs
lightning/src/ln/functional_test_utils.rs
lightning/src/ln/functional_tests.rs