You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea of the Config struct used in the CLI is that it is a thin wrapper around existing config structs to the extent possible to lower maintenance, i.e. instead of having to add new config in 2 places, you just add it in one.
Currently though, it is not possible to serialize or deserialize the NetworkConfig struct (or NetworkConfigBuilder) because:
It takes a generic parameter C as a stand-in for the client.
It holds a Box<dyn BlockImport>
There are a few possible paths here:
We try to make NetworkConfigBuilder serializable by moving the non-serializable parts into the build function, or
We make NetworkConfig serializable, which means the networking components need to take the unserializable things separately from the config,
We make a new slimmer version of NetworkConfig that is Serialize and Deserialize, and we have NetworkConfig hold one of these
Additional context
As part of this issue we would also need to deduplicate a few things. Currently we have a PeersConfig as part of the Config struct, but this is also present on NetworkConfig.
The text was updated successfully, but these errors were encountered:
Describe the feature
The idea of the
Config
struct used in the CLI is that it is a thin wrapper around existing config structs to the extent possible to lower maintenance, i.e. instead of having to add new config in 2 places, you just add it in one.Currently though, it is not possible to serialize or deserialize the
NetworkConfig
struct (orNetworkConfigBuilder
) because:C
as a stand-in for the client.Box<dyn BlockImport>
There are a few possible paths here:
NetworkConfigBuilder
serializable by moving the non-serializable parts into thebuild
function, orNetworkConfig
serializable, which means the networking components need to take the unserializable things separately from the config,NetworkConfig
that isSerialize
andDeserialize
, and we haveNetworkConfig
hold one of theseAdditional context
As part of this issue we would also need to deduplicate a few things. Currently we have a
PeersConfig
as part of theConfig
struct, but this is also present onNetworkConfig
.The text was updated successfully, but these errors were encountered: