mirror of
https://github.com/aljazceru/lightning.git
synced 2026-02-02 20:54:23 +01:00
We can have almost arbitrary re-transmissions of private updates, looking at the decode: in this case, instead of the expected:
```
DELETED: private channel_announcement (scid23)
DELETED: private channel_update (scid23/0)
DELETED: private channel_update (scid23/1)
delete channel (scid23)
channel_announcement (scid23)
channel_amount
DELETED: channel_update (scid23/0)
DELETED: channel_update (scid23/1)
node_announcement
node_announcement
channel_update (scid23)
private channel_announcement (scid12)
DELETED: private channel_update (scid12/0)
DELETED: private channel_update (scid12/1)
channel_update (scid23)
private_channel_update (scid12)
private_channel_update (scid12)
```
We had:
```
DELETED: private channel_announcement
DELETED: private channel_update
DELETED: private channel_update
DELETED: private channel_update
DELETED: private channel_update
channel_announcement
channel_amount
DELETED: channel_update
DELETED: channel_update
node_announcement
node_announcement
channel_update
private channel_announcement
DELETED: private channel_update
DELETED: private channel_update
channel_update
private channel_update
private channel_update
```
Which means we deleted 9, and hence failed:
```
@pytest.mark.developer("gossip without DEVELOPER=1 is slow")
def test_gossip_store_compact_on_load(node_factory, bitcoind):
l2 = setup_gossip_store_test(node_factory, bitcoind)
gs_path = os.path.join(l2.daemon.lightning_dir, TEST_NETWORK, 'gossip_store')
gs = subprocess.run(['devtools/dump-gossipstore', '--print-deleted', gs_path],
check=True, timeout=TIMEOUT, stdout=subprocess.PIPE)
print(gs.stdout.decode())
l2.restart()
> wait_for(lambda: l2.daemon.is_in_log(r'gossip_store_compact_offline: [5-8] deleted, 9 copied'))
tests/test_gossip.py:1776:
```