From d32aa9289f097e3e66228b62ae236233c7f37a8b Mon Sep 17 00:00:00 2001 From: vedhavyas Date: Thu, 27 Jun 2024 15:29:48 +0530 Subject: [PATCH] revert the api function name change --- crates/sp-domains/src/lib.rs | 4 +++- crates/subspace-fake-runtime-api/src/lib.rs | 2 +- crates/subspace-runtime/src/lib.rs | 2 +- domains/client/domain-operator/src/fraud_proof.rs | 2 +- test/subspace-test-runtime/src/lib.rs | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/crates/sp-domains/src/lib.rs b/crates/sp-domains/src/lib.rs index ec82ded47c..09c1c6df8f 100644 --- a/crates/sp-domains/src/lib.rs +++ b/crates/sp-domains/src/lib.rs @@ -1496,7 +1496,9 @@ sp_api::decl_runtime_apis! { fn storage_fund_account_balance(operator_id: OperatorId) -> Balance; /// Return if the domain runtime code is upgraded since `at` - fn is_domain_runtime_upgraded_since(domain_id: DomainId, at: NumberFor) -> Option; + // TODO: change from `is_domain_runtime_updraded_since` to `is_domain_runtime_upgraded_since` + // before next network + fn is_domain_runtime_updraded_since(domain_id: DomainId, at: NumberFor) -> Option; } pub trait BundleProducerElectionApi { diff --git a/crates/subspace-fake-runtime-api/src/lib.rs b/crates/subspace-fake-runtime-api/src/lib.rs index f3c5231c55..21ac8692d6 100644 --- a/crates/subspace-fake-runtime-api/src/lib.rs +++ b/crates/subspace-fake-runtime-api/src/lib.rs @@ -302,7 +302,7 @@ sp_api::impl_runtime_apis! { unreachable!() } - fn is_domain_runtime_upgraded_since(_domain_id: DomainId, _at: NumberFor) -> Option { + fn is_domain_runtime_updraded_since(_domain_id: DomainId, _at: NumberFor) -> Option { unreachable!() } } diff --git a/crates/subspace-runtime/src/lib.rs b/crates/subspace-runtime/src/lib.rs index 852fa9d2d8..bc27298217 100644 --- a/crates/subspace-runtime/src/lib.rs +++ b/crates/subspace-runtime/src/lib.rs @@ -1242,7 +1242,7 @@ impl_runtime_apis! { Domains::storage_fund_account_balance(operator_id) } - fn is_domain_runtime_upgraded_since(domain_id: DomainId, at: NumberFor) -> Option { + fn is_domain_runtime_updraded_since(domain_id: DomainId, at: NumberFor) -> Option { Domains::is_domain_runtime_upgraded_since(domain_id, at) } } diff --git a/domains/client/domain-operator/src/fraud_proof.rs b/domains/client/domain-operator/src/fraud_proof.rs index e64dbde241..ae09db1d1c 100644 --- a/domains/client/domain-operator/src/fraud_proof.rs +++ b/domains/client/domain-operator/src/fraud_proof.rs @@ -177,7 +177,7 @@ where ) })?; let is_domain_runtime_upgraded_since = runtime_api - .is_domain_runtime_upgraded_since(best_hash, domain_id, parent_consensus_number)? + .is_domain_runtime_updraded_since(best_hash, domain_id, parent_consensus_number)? .ok_or_else(|| { sp_blockchain::Error::Application( "Failed to get domain runtime object".to_string().into(), diff --git a/test/subspace-test-runtime/src/lib.rs b/test/subspace-test-runtime/src/lib.rs index faa5c3b0a9..0d153f2cf6 100644 --- a/test/subspace-test-runtime/src/lib.rs +++ b/test/subspace-test-runtime/src/lib.rs @@ -1439,7 +1439,7 @@ impl_runtime_apis! { Domains::storage_fund_account_balance(operator_id) } - fn is_domain_runtime_upgraded_since(domain_id: DomainId, at: NumberFor) -> Option { + fn is_domain_runtime_updraded_since(domain_id: DomainId, at: NumberFor) -> Option { Domains::is_domain_runtime_upgraded_since(domain_id, at) } }