Move parachain inherent data into its own crate (#326)

This renames and moves the `SystemInherentData` into its own crate.
The struct is now called `ParachainInherentData`. Besides moving the
struct, this also moves the code for creating this struct into this crate.
This commit is contained in:
Bastian Köcher
2021-02-11 13:05:17 +01:00
committed by GitHub
parent fbacfe7937
commit 886a1e1c76
13 changed files with 445 additions and 305 deletions
+5 -6
View File
@@ -15,11 +15,10 @@
// along with Cumulus. If not, see <http://www.gnu.org/licenses/>.
use crate::{Backend, Client};
use cumulus_primitives_core::{
inherents::{SystemInherentData, SYSTEM_INHERENT_IDENTIFIER}, PersistedValidationData,
};
use cumulus_test_runtime::{Block, GetLastTimestamp};
use cumulus_primitives_core::PersistedValidationData;
use cumulus_primitives_parachain_inherent::{ParachainInherentData, INHERENT_IDENTIFIER};
use cumulus_test_relay_sproof_builder::RelayStateSproofBuilder;
use cumulus_test_runtime::{Block, GetLastTimestamp};
use polkadot_primitives::v1::BlockNumber as PBlockNumber;
use sc_block_builder::{BlockBuilder, BlockBuilderProvider};
use sp_api::ProvideRuntimeApi;
@@ -101,8 +100,8 @@ impl InitBlockBuilder for Client {
inherent_data
.put_data(
SYSTEM_INHERENT_IDENTIFIER,
&SystemInherentData {
INHERENT_IDENTIFIER,
&ParachainInherentData {
validation_data,
relay_chain_state,
downward_messages: Default::default(),