Runtime API for historical validation code (#1893)

* fix: ensure candidate validation gets code based on occupied core assumption

* guide: runtime API for historical validation code

* add historical runtime API

* integrate into runtime API subsystem

* remove blocked TODO

* fix service build: enable notifications protocol only under real overseer

* Update node/subsystem/src/messages.rs

Co-authored-by: Sergei Shulepov <sergei@parity.io>

* fix compilation

Co-authored-by: Robert Habermeier <robert@Roberts-MacBook-Pro.local>
Co-authored-by: Sergei Shulepov <sergei@parity.io>
This commit is contained in:
authored and GitHub committed 2020-11-02 12:19:53 -06:00
1 parent a3e58350bb
commit 1f4121c444
13 files changed
+152 -7

No files matched your search

@@ -250,6 +250,14 @@ pub fn validation_code<T: initializer::Trait>(
)
}
/// Implementation for the `historical_validation_code` function of the runtime API.
pub fn historical_validation_code<T: initializer::Trait>(
para_id: ParaId,
context_height: T::BlockNumber,
) -> Option<ValidationCode> {
<paras::Module<T>>::validation_code_at(para_id, context_height, None)
}
/// Implementation for the `candidate_pending_availability` function of the runtime API.
pub fn candidate_pending_availability<T: initializer::Trait>(para_id: ParaId)
-> Option<CommittedCandidateReceipt<T::Hash>>