oasis_runtime_sdk/config.rs
1//! Configuration types.
2
3/// Runtime schedule control configuration.
4pub struct ScheduleControl {
5 /// Size of the initial batch that the node should provide to the runtime.
6 pub initial_batch_size: u32,
7 /// Size of each extra batch that the runtime should fetch.
8 pub batch_size: u32,
9 /// Minimum amount of gas that needs to be remaining in a batch in order to still consider
10 /// including new transactions.
11 pub min_remaining_gas: u64,
12 /// Maximum number of transactions that can go in a batch.
13 ///
14 /// This is only used as a last resort to avoid the batch going over the runtime's limit.
15 pub max_tx_count: usize,
16}
17
18impl ScheduleControl {
19 /// Construct a default schedule control configuration.
20 pub const fn default() -> Self {
21 Self {
22 initial_batch_size: 50,
23 batch_size: 50,
24 min_remaining_gas: 1_000,
25 max_tx_count: 1_000,
26 }
27 }
28}