diff --git a/domains/client/cross-domain-message-gossip/src/aux_schema.rs b/domains/client/cross-domain-message-gossip/src/aux_schema.rs index f90f0f0bf5..60d9d72001 100644 --- a/domains/client/cross-domain-message-gossip/src/aux_schema.rs +++ b/domains/client/cross-domain-message-gossip/src/aux_schema.rs @@ -1,5 +1,6 @@ //! Schema for channel update storage. +use crate::RELAYER_PREFIX; use parity_scale_codec::{Decode, Encode}; use sc_client_api::backend::AuxStore; use sp_blockchain::{Error as ClientError, Info, Result as ClientResult}; @@ -88,6 +89,19 @@ where channel_detail.encode().as_slice(), )], vec![], + )?; + + let channel_nonce = ChannelNonce { + relay_msg_nonce: Some(channel_detail.next_inbox_nonce), + relay_response_msg_nonce: channel_detail.latest_response_received_message_nonce, + }; + let prefix = (RELAYER_PREFIX, src_chain_id).encode(); + cleanup_chain_channel_storages( + backend, + &prefix, + src_chain_id, + channel_detail.channel_id, + channel_nonce, ) }