1953 defensive testing extrinsic (#1998)

# Description

The `trigger_defensive` call has been added to the `root-testing`
pallet. The idea is to have this pallet running on `Rococo/Westend` and
use it to verify if the runtime monitoring works end-to-end.

To accomplish this, `trigger_defensive` dispatches an event when it is
called.

Closes #1953

# Checklist

- [x] My PR includes a detailed description as outlined in the
"Description" section above
- [ ] My PR follows the [labeling requirements](CONTRIBUTING.md#Process)
of this project (at minimum one label for `T`
  required)
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [ ] I have added tests that prove my fix is effective or that my
feature works (if applicable)

You can remove the "Checklist" section once all have been checked. Thank
you for your contribution!

✄
-----------------------------------------------------------------------------

---------

Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
This commit is contained in:
Adel Arja
2023-10-31 14:35:19 -03:00
committed by GitHub
parent 64f4b15640
commit 6e2f94f81c
9 changed files with 53 additions and 9 deletions
+3 -3
View File
@@ -55,7 +55,7 @@ impl VariantCount for () {
macro_rules! defensive {
() => {
frame_support::__private::log::error!(
target: "runtime",
target: "runtime::defensive",
"{}",
$crate::traits::DEFENSIVE_OP_PUBLIC_ERROR
);
@@ -63,7 +63,7 @@ macro_rules! defensive {
};
($error:expr $(,)?) => {
frame_support::__private::log::error!(
target: "runtime",
target: "runtime::defensive",
"{}: {:?}",
$crate::traits::DEFENSIVE_OP_PUBLIC_ERROR,
$error
@@ -72,7 +72,7 @@ macro_rules! defensive {
};
($error:expr, $proof:expr $(,)?) => {
frame_support::__private::log::error!(
target: "runtime",
target: "runtime::defensive",
"{}: {:?}: {:?}",
$crate::traits::DEFENSIVE_OP_PUBLIC_ERROR,
$error,