Skip to content

topology: don't call gossmap for locally added channels.#7025

Merged
rustyrussell merged 2 commits intoElementsProject:masterfrom
rustyrussell:topology-valgrind-fix
Jan 31, 2024
Merged

topology: don't call gossmap for locally added channels.#7025
rustyrussell merged 2 commits intoElementsProject:masterfrom
rustyrussell:topology-valgrind-fix

Conversation

@rustyrussell
Copy link
Contributor

@rustyrussell rustyrussell commented Jan 31, 2024

This happens in deprecated mode, and we get bogus results. Valgrind caught it!

Bonus: fix another flake.

Changelog-None: Introduced in recent gossip changes.

This happens in deprecated mode, and we get bogus results.  Valgrind caught it!

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell added the Type::Bug An error, flaw, or fault that produces an incorrect or unexpected result label Jan 31, 2024
@rustyrussell rustyrussell added this to the v24.02 milestone Jan 31, 2024
We need to make sure l1 has closed previous channel:

```
wait_for(lambda: only_one(l1.rpc.listpeerchannels()['channels'])['state'] == 'CHANNELD_NORMAL')

tests/test_connection.py:3866: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
contrib/pyln-testing/pyln/testing/utils.py:88: in wait_for
    while not success():
tests/test_connection.py:3866: in <lambda>
    wait_for(lambda: only_one(l1.rpc.listpeerchannels()['channels'])['state'] == 'CHANNELD_NORMAL')
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

arr = [{'alias': {'local': '7000028x5013088x54781', 'remote': '3360520x6431919x56666'}, 'channel_id': 'fb198b27b1be882937eea...: ['static_remotekey/even']}, 'close_to': '5120888ab14b6e1655d1d00039b836d70b66e3351543ab6cd2f94166255f3d5e6cb5', ...}]

    def only_one(arr):
        """Many JSON RPC calls return an array; often we only expect a single entry
        """
>       assert len(arr) == 1
E       AssertionError
```

Signed-off-by: Rusty Russell <[email protected]>
@rustyrussell rustyrussell changed the title topology: don't call gossmap for locall added channels. topology: don't call gossmap for locally added channels. Jan 31, 2024
@rustyrussell rustyrussell merged commit d2e7831 into ElementsProject:master Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type::Bug An error, flaw, or fault that produces an incorrect or unexpected result

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant