Skip to content

Commit

Permalink
Add fake runtime genesis config
Browse files Browse the repository at this point in the history
  • Loading branch information
dastansam committed May 2, 2024
1 parent 9c437b0 commit 3d22c34
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.

//! Provides "fake" runtime API implementations as a workaround for compile-time checks.
//! Provides "fake" runtime API and `RuntimeGenesisConfig` implementations as a workaround for compile-time checks.
//!
//! These are used to provide a type that implements these runtime apis without requiring to import the native runtimes.
Expand Down Expand Up @@ -65,6 +65,15 @@ sp_api::decl_runtime_apis! {

struct Runtime;

#[derive(serde::Deserialize, serde::Serialize)]
struct RuntimeGenesisConfig;

impl BuildStorage for RuntimeGenesisConfig {
fn assimilate_storage(&self, _storage: &mut sp_core::storage::Storage) -> Result<(), String> {
unimplemented!()
}
}

sp_api::impl_runtime_apis! {
impl sp_api::Core<Block> for Runtime {
fn version() -> RuntimeVersion {
Expand Down
2 changes: 1 addition & 1 deletion crates/subspace-service/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

pub mod config;
pub mod dsn;
pub mod fake_runtime_api;
pub mod fake_runtime;
mod metrics;
pub mod rpc;
pub mod sync_from_dsn;
Expand Down

0 comments on commit 3d22c34

Please sign in to comment.