Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Domains: Revert the api function name change #2881

Merged
merged 1 commit into from
Jun 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion crates/sp-domains/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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<Block>) -> Option<bool>;
// 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<Block>) -> Option<bool>;
}

pub trait BundleProducerElectionApi<Balance: Encode + Decode> {
2 changes: 1 addition & 1 deletion crates/subspace-fake-runtime-api/src/lib.rs
Original file line number Diff line number Diff line change
@@ -302,7 +302,7 @@ sp_api::impl_runtime_apis! {
unreachable!()
}

fn is_domain_runtime_upgraded_since(_domain_id: DomainId, _at: NumberFor<Block>) -> Option<bool> {
fn is_domain_runtime_updraded_since(_domain_id: DomainId, _at: NumberFor<Block>) -> Option<bool> {
unreachable!()
}
}
2 changes: 1 addition & 1 deletion crates/subspace-runtime/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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<Block>) -> Option<bool> {
fn is_domain_runtime_updraded_since(domain_id: DomainId, at: NumberFor<Block>) -> Option<bool> {
Domains::is_domain_runtime_upgraded_since(domain_id, at)
}
}
2 changes: 1 addition & 1 deletion domains/client/domain-operator/src/fraud_proof.rs
Original file line number Diff line number Diff line change
@@ -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(),
2 changes: 1 addition & 1 deletion test/subspace-test-runtime/src/lib.rs
Original file line number Diff line number Diff line change
@@ -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<Block>) -> Option<bool> {
fn is_domain_runtime_updraded_since(domain_id: DomainId, at: NumberFor<Block>) -> Option<bool> {
Domains::is_domain_runtime_upgraded_since(domain_id, at)
}
}