diff --git a/pallets/reactions/src/benchmarking.rs b/pallets/reactions/src/benchmarking.rs index c88b92f9..215a73d2 100644 --- a/pallets/reactions/src/benchmarking.rs +++ b/pallets/reactions/src/benchmarking.rs @@ -78,6 +78,7 @@ benchmarks! { let other_kind = match reaction.kind { ReactionKind::Upvote => ReactionKind::Downvote, ReactionKind::Downvote => ReactionKind::Upvote, + _ => ReactionKind::Upvote, }; }: _(origin, post.id, reaction.id, other_kind) verify { diff --git a/pallets/reactions/src/lib.rs b/pallets/reactions/src/lib.rs index af4f5de2..b709dce0 100644 --- a/pallets/reactions/src/lib.rs +++ b/pallets/reactions/src/lib.rs @@ -33,6 +33,7 @@ pub type ReactionId = u64; pub enum ReactionKind { Upvote, Downvote, + Custom(u32), } impl Default for ReactionKind { @@ -201,6 +202,7 @@ pub mod pallet { )?; post.inc_downvotes(); }, + _ => {}, } PostById::::insert(post_id, post.clone()); @@ -256,6 +258,7 @@ pub mod pallet { post.inc_downvotes(); post.dec_upvotes(); }, + _ => {}, } ReactionById::::insert(reaction_id, reaction); @@ -299,6 +302,7 @@ pub mod pallet { match reaction.kind { ReactionKind::Upvote => post.dec_upvotes(), ReactionKind::Downvote => post.dec_downvotes(), + _ => {}, } PostById::::insert(post_id, post.clone());