diff --git a/pallets/author-inherent/src/lib.rs b/pallets/author-inherent/src/lib.rs index a0398da..7f37a3e 100644 --- a/pallets/author-inherent/src/lib.rs +++ b/pallets/author-inherent/src/lib.rs @@ -143,9 +143,9 @@ pub mod pallet { let new_slot = T::SlotBeacon::slot(); // Now check that the author is valid in this slot - assert!( + ensure!( T::CanAuthor::can_author(&Self::get(), &new_slot), - "Block invalid, supplied author is not eligible." + Error::::CannotBeAuthor ); InherentIncluded::::put(true);