mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-26 13:27:57 +00:00
Use correct ExecutionContext for check_inherents (#9483)
Before we used the `other` context, while we are actually either in the import or sync context.
This commit is contained in:
@@ -75,6 +75,16 @@ pub enum BlockOrigin {
|
||||
File,
|
||||
}
|
||||
|
||||
impl From<BlockOrigin> for sp_core::ExecutionContext {
|
||||
fn from(origin: BlockOrigin) -> Self {
|
||||
if origin == BlockOrigin::NetworkInitialSync {
|
||||
sp_core::ExecutionContext::Syncing
|
||||
} else {
|
||||
sp_core::ExecutionContext::Importing
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Environment for a Consensus instance.
|
||||
///
|
||||
/// Creates proposer instance.
|
||||
|
||||
Reference in New Issue
Block a user