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

feat(pallet-tfgrid): check storage state #817

Draft
wants to merge 11 commits into
base: development
Choose a base branch
from
Prev Previous commit
Next Next commit
trying to fix AccountId display with no success
  • Loading branch information
renauter committed Jul 28, 2023
commit e3b65b6577164a576e60c27f436644a7eb5875df
9 changes: 5 additions & 4 deletions substrate-node/pallets/pallet-tfgrid/src/migrations/v15.rs
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ use crate::*;
use frame_support::{traits::Get, traits::OnRuntimeUpgrade, weights::Weight};
use log::{debug, info};
use scale_info::prelude::string::String;
use sp_core::H256;
use sp_std::{marker::PhantomData, vec::Vec};

#[cfg(feature = "try-runtime")]
@@ -373,15 +374,15 @@ pub fn check_twins<T: Config>() {
if !TwinIdByAccountID::<T>::contains_key(&twin.account_id) {
debug!(
" ⚠️ Twins[id: {}]: account (account_id: {:?}) not found",
twin_id, twin.account_id
twin_id, &twin.account_id
);
}

// UsersTermsAndConditions
if !UsersTermsAndConditions::<T>::contains_key(&twin.account_id) {
debug!(
" ⚠️ Twins[id: {}]: users terms and conditions (account_id: {:?}) not found",
twin_id, twin.account_id
twin_id, &twin.account_id
);
}
}
@@ -404,13 +405,13 @@ pub fn check_twin_id_by_account_id<T: Config>() {
if account_id != twin.account_id {
debug!(
" ⚠️ TwinIdByAccountID[account_id: {:?}]: account ({:?}) on twin {} not matching",
account_id, twin.account_id, twin_id,
&account_id, &twin.account_id, twin_id,
);
}
} else {
debug!(
" ⚠️ TwinIdByAccountID[account_id: {:?}]: twin {} not exists",
account_id, twin_id
&account_id, twin_id
);
}
}