Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Adds a mock provider for the parachain inherent #484

Merged

Conversation

JoshOrndorff
Copy link
Contributor

This PR introduces an inherent data provider for the parachain inherent that provides minimal data. This is useful for testing your parachain runtime in a lighter context than spinning up a full relay chain.

This provider includes a minimal storage proof, and a mocked relay chain block number. The parameters of how the relay chain block number is mocked are tunable.

This is groundwork for #483

Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of this should just be in a mock.rs in the inherent crate.

@JoshOrndorff
Copy link
Contributor Author

JoshOrndorff commented Jun 10, 2021

Okay, I've moved it where you asked. The reason I made a separate crate was to not make #466 worse. But I agree this should live here.

Copy link
Member

@bkchr bkchr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to put mod mock.rs into the lib.rs file

@bkchr bkchr merged commit 1bb5e2a into paritytech:master Jun 23, 2021
chevdor pushed a commit to chevdor/cumulus that referenced this pull request Jun 24, 2021
* Bring in code from moonbeam

* move it to mock.rs

* Actually build it 🤦
slumber pushed a commit that referenced this pull request Sep 1, 2021
* Bring in code from moonbeam

* move it to mock.rs

* Actually build it 🤦
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants