Use log::error! for bad mandatory (#8521)

To make the life of people easier ;)
This commit is contained in:
Bastian Köcher
2021-04-04 13:42:11 +02:00
committed by GitHub
parent 1740177462
commit 4e334f59d6
3 changed files with 5 additions and 7 deletions
@@ -18,7 +18,7 @@
use crate::{limits::BlockWeights, Config, Pallet};
use codec::{Encode, Decode};
use sp_runtime::{
traits::{SignedExtension, DispatchInfoOf, Dispatchable, PostDispatchInfoOf, Printable},
traits::{SignedExtension, DispatchInfoOf, Dispatchable, PostDispatchInfoOf},
transaction_validity::{
ValidTransaction, TransactionValidityError, InvalidTransaction, TransactionValidity,
TransactionPriority,
@@ -248,9 +248,7 @@ impl<T: Config + Send + Sync> SignedExtension for CheckWeight<T> where
// to them actually being useful. Block producers are thus not allowed to include mandatory
// extrinsics that result in error.
if let (DispatchClass::Mandatory, Err(e)) = (info.class, result) {
"Bad mandatory".print();
e.print();
log::error!(target: "runtime::system", "Bad mandatory: {:?}", e);
Err(InvalidTransaction::BadMandatory)?
}