mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-10-27 22:19:49 +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:
1 parent
0240efde58
commit
3b471704d9
6 files changed
+25
-12
No files matched your search
@@ -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