Skip to content

Commit

Permalink
Custom digest for V2
Browse files Browse the repository at this point in the history
  • Loading branch information
yrong committed Nov 14, 2024
1 parent 206b300 commit 8b3e178
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion bridges/snowbridge/pallets/outbound-queue-v2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ pub mod pallet {
// Create merkle root of messages
let root = merkle_root::<<T as Config>::Hashing, _>(MessageLeaves::<T>::stream_iter());

let digest_item: DigestItem = CustomDigestItem::Snowbridge(root).into();
let digest_item: DigestItem = CustomDigestItem::SnowbridgeV2(root).into();

// Insert merkle root into the header digest
<frame_system::Pallet<T>>::deposit_log(digest_item);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ pub enum CustomDigestItem {
#[codec(index = 0)]
/// Merkle root of outbound Snowbridge messages.
Snowbridge(H256),
#[codec(index = 1)]
/// Merkle root of outbound Snowbridge V2 messages.
SnowbridgeV2(H256),
}

/// Convert custom application digest item into a concrete digest item
Expand Down

0 comments on commit 8b3e178

Please sign in to comment.