Update for using Mandatory inherents (#967)

* Update for using Mandatory inherents.

* use
This commit is contained in:
Gavin Wood
2020-04-05 14:27:58 +02:00
committed by GitHub
parent 15a83079ba
commit 7f838b0c35
3 changed files with 12 additions and 3 deletions
+10 -1
View File
@@ -277,7 +277,16 @@ impl<Client, TxPool, Backend> CreateProposalData<Client, TxPool, Backend> where
{
let inherents = runtime_api.inherent_extrinsics(&self.parent_id, inherent_data)?;
for inherent in inherents {
block_builder.push(inherent)?;
match block_builder.push(inherent) {
Err(sp_blockchain::Error::ApplyExtrinsicFailed(sp_blockchain::ApplyExtrinsicFailed::Validity(e)))
if e.exhausted_resources() => {
warn!("⚠️ Dropping non-mandatory inherent from overweight block.");
}
Err(e) => {
warn!("❗️ Inherent extrinsic returned unexpected error: {}. Dropping.", e);
}
Ok(_) => {}
}
}
let mut unqueue_invalid = Vec::new();