Skip to content
Unverified Commit 5a431470 authored by tmpolaczyk's avatar tmpolaczyk Committed by GitHub
Browse files

Allow to call arbitrary runtime apis using RelayChainInterface (#5521)



When using the relay chain though a `Arc<dyn RelayChainInterface>` there
is no way to call arbitrary runtime apis. Both implementations of that
trait allow this, so it feels natural to expose this functionality in
the trait.

This PR adds a `call_runtime_api` method to RelayChainInterface trait,
and a separate function also named `call_runtime_api` which allows the
caller to specify the input and output types, as opposed to having to
encode them. This generic function cannot be part of the trait because a
`dyn Trait` object cannot have generic methods.

---------

Co-authored-by: default avatarBastian Köcher <[email protected]>
parent 86bb5cb5
Pipeline #497981 waiting for manual action with stages
in 1 hour, 32 minutes, and 36 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment