diff --git a/polkadot/runtime/parachains/src/inclusion_inherent.rs b/polkadot/runtime/parachains/src/inclusion_inherent.rs index d71a81a0a2..cc121ed356 100644 --- a/polkadot/runtime/parachains/src/inclusion_inherent.rs +++ b/polkadot/runtime/parachains/src/inclusion_inherent.rs @@ -196,18 +196,25 @@ impl ProvideInherent for Module { )| { // Sanity check: session changes can invalidate an inherent, and we _really_ don't want that to happen. // See github.com/paritytech/polkadot/issues/1327 - if Self::inclusion( + let (signed_bitfields, backed_candidates) = match Self::inclusion( frame_system::RawOrigin::None.into(), signed_bitfields.clone(), backed_candidates.clone(), parent_header.clone(), - ) - .is_ok() - { - Call::inclusion(signed_bitfields, backed_candidates, parent_header) - } else { - Call::inclusion(Vec::new().into(), Vec::new(), parent_header) - } + ) { + Ok(_) => (signed_bitfields, backed_candidates), + Err(err) => { + frame_support::debug::RuntimeLogger::init(); + frame_support::debug::warn!( + target: "runtime_inclusion_inherent", + "dropping signed_bitfields and backed_candidates because they produced \ + an invalid inclusion inherent: {:?}", + err, + ); + (Vec::new().into(), Vec::new()) + } + }; + Call::inclusion(signed_bitfields, backed_candidates, parent_header) } ) }