Skip to content

Commit bd32336

Browse files
add force-set-notification-id & modify notification to match update in anchor (#63)
1 parent 30af792 commit bd32336

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

appchain/src/lib.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,21 @@ pub mod pallet {
10821082

10831083
Ok(())
10841084
}
1085+
1086+
#[pallet::weight(0)]
1087+
pub fn force_set_next_notification_id(
1088+
origin: OriginFor<T>,
1089+
next_notification_id: u32,
1090+
) -> DispatchResult {
1091+
ensure_root(origin)?;
1092+
<NextNotificationId<T>>::put(next_notification_id);
1093+
log!(
1094+
info,
1095+
"️️️force set next_notification_id, next_notification_id is : {:?} ",
1096+
NextNotificationId::<T>::get()
1097+
);
1098+
Ok(())
1099+
}
10851100
}
10861101

10871102
impl<T: Config> TokenIdAndAssetIdProvider<T::AssetId> for Pallet<T> {

appchain/src/mainchain.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ struct ResponseResult {
1919
pub struct AppchainNotificationHistory<AccountId> {
2020
#[serde(bound(deserialize = "AccountId: Decode"))]
2121
appchain_notification: AppchainNotification<AccountId>,
22-
block_height: u64,
23-
timestamp: u64,
2422
#[serde(deserialize_with = "deserialize_from_str")]
2523
index: u32,
2624
}

0 commit comments

Comments
 (0)