Description
Caused by a race condition on updating the custody value and initialising different modules in our code.
It was found while we were looking at #9973.
Steps to Reproduce (Bug)
Easy to reproduce in Kurtosis:
- create Kurtosis config with non-supernodes
- start testnet
- stop one node, then start again
Expected behavior:
Teku should follow the spec and connect to all required subnets.
Actual behavior:
Changes in CGC that lead to increase in the required subnets aren't reflected in our p2p layer and we don't connect to the new subnets.
Frequency:
All the time when we are not using --p2p-subscribe-all-custody-subnets-enabled.