mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 10:11:03 +00:00
Add support for modules to require inherent to be present (#5792)
* Add support for modules to require inherent to be present * Bump node impl version * Allow is_inherent_required itself to return error This handles the case if runtime fails to check the inherent data (if the inherent data is invalid, etc). * typo: &module -> $module * fix: iter
This commit is contained in:
@@ -408,6 +408,11 @@ pub trait ProvideInherent {
|
||||
/// Create an inherent out of the given `InherentData`.
|
||||
fn create_inherent(data: &InherentData) -> Option<Self::Call>;
|
||||
|
||||
/// If `Some`, indicates that an inherent is required. Check will return the inner error if no
|
||||
/// inherent is found. If `Err`, indicates that the check failed and further operations should
|
||||
/// be aborted.
|
||||
fn is_inherent_required(_: &InherentData) -> Result<Option<Self::Error>, Self::Error> { Ok(None) }
|
||||
|
||||
/// Check the given inherent if it is valid.
|
||||
/// Checking the inherent is optional and can be omitted.
|
||||
fn check_inherent(_: &Self::Call, _: &InherentData) -> Result<(), Self::Error> {
|
||||
|
||||
Reference in New Issue
Block a user