Skip to content
Snippets Groups Projects
  • Nazar Mokrynskyi's avatar
    Improve `sc-service` API (#5364) · da654103
    Nazar Mokrynskyi authored
    
    This improves `sc-service` API by not requiring the whole
    `&Configuration`, using specific configuration options instead.
    `RpcConfiguration` was also extracted from `Configuration` to group all
    RPC options together.
    
    We don't use Substrate's CLI and would rather not use `Configuration`
    either, but some key public functions require it even though they
    ignored most of the fields anyway.
    
    `RpcConfiguration` is very helpful not just for consolidation of the
    fields, but also to finally make RPC optional for our use case, while
    Substrate still runs RPC server on localhost even if listening address
    is explicitly set to `None`, which is annoying (and I suspect there is a
    reason for it, so didn't want to change the default just yet).
    
    While this is a breaking change, most developers will not notice it if
    they use higher-level APIs.
    
    Fixes https://github.com/paritytech/polkadot-sdk/issues/2897
    
    ---------
    
    Co-authored-by: default avatarNiklas Adolfsson <niklasadolfsson1@gmail.com>
    Unverified
    da654103
Code owners
Assign users and groups as approvers for specific file changes. Learn more.