Adds support for returning a custom header from validate_block (#825)

* Adds support for returning a custom header from `validate_block`

This adds support for returning a custom header from `validate_block`. Before this, we always
returned the header of the block that was validated (and still do it by default). However, after
this pr it is possible to set a custom header or better custom head data that will be returned
instead from `validate_block`. This can be for example when a chain wants to fork.

* FMT
This commit is contained in:
Bastian Köcher
2021-12-03 12:49:13 +01:00
committed by GitHub
parent 70ea98995a
commit 32a86d8ef4
8 changed files with 156 additions and 17 deletions
+1
View File
@@ -128,5 +128,6 @@ fn testnet_genesis(
balances: endowed_accounts.iter().cloned().map(|k| (k, 1 << 60)).collect(),
},
sudo: cumulus_test_runtime::SudoConfig { key: root_key },
transaction_payment: Default::default(),
}
}