mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 10:01:17 +00:00
client: use appropriate ExecutionContext for initial sync / regular import (#6180)
* client: use appropriate ExecutionContext for sync/import * client: remove dead code * client: ExecutionContext: distinguish between own and foreign imports * client: fix cli parameter doc * Revert "client: ExecutionContext: distinguish between own and foreign imports" This reverts commit 0fac11520704c364a82432c5b927e987ba043cdb. * primitives: add docs for ExecutionContext * cli: execution strategy docs * cli: use different execution context for importing block on validator * cli: remove defaults from execution context flags
This commit is contained in:
@@ -93,9 +93,16 @@ pub use sp_std;
|
||||
|
||||
/// Context for executing a call into the runtime.
|
||||
pub enum ExecutionContext {
|
||||
/// Context for general importing (including own blocks).
|
||||
/// Context used for general block import (including locally authored blocks).
|
||||
Importing,
|
||||
/// Context used when syncing the blockchain.
|
||||
/// Context used for importing blocks as part of an initial sync of the blockchain.
|
||||
///
|
||||
/// We distinguish between major sync and import so that validators who are running
|
||||
/// their initial sync (or catching up after some time offline) can use the faster
|
||||
/// native runtime (since we can reasonably assume the network as a whole has already
|
||||
/// come to a broad conensus on the block and it probably hasn't been crafted
|
||||
/// specifically to attack this node), but when importing blocks at the head of the
|
||||
/// chain in normal operation they can use the safer Wasm version.
|
||||
Syncing,
|
||||
/// Context used for block construction.
|
||||
BlockConstruction,
|
||||
|
||||
Reference in New Issue
Block a user