Implement the Runtime API subsystem (#1494)

* type defaults for ParachainHost

* add ValidationCode message

* implement core loop of runtime API subsystem

* subsystem trait implementation for runtime API subsystem

* implement a mock runtime API

* some tests that ensure requests are forwarded to runtime API correctly

* fix dependency grumbles

* improve RuntimeApiError API
This commit is contained in:
Robert Habermeier
2020-07-30 14:15:00 -04:00
committed by GitHub
parent 80303e99ea
commit 652ae86afd
6 changed files with 470 additions and 8 deletions
+1 -1
View File
@@ -646,7 +646,7 @@ pub enum CandidateEvent<H = Hash> {
sp_api::decl_runtime_apis! {
/// The API for querying the state of parachains on-chain.
pub trait ParachainHost<H: Decode, N: Decode> {
pub trait ParachainHost<H: Decode = Hash, N: Decode = BlockNumber> {
/// Get the current validators.
fn validators() -> Vec<ValidatorId>;