unc_primitives/runtime/
migration_data.rs

1use crate::receipt::ReceiptResult;
2use crate::types::AccountId;
3use crate::types::Gas;
4use std::fmt;
5use std::fmt::{Debug, Formatter};
6
7#[derive(Default)]
8pub struct MigrationData {
9    pub storage_usage_delta: Vec<(AccountId, u64)>,
10    pub storage_usage_fix_gas: Gas,
11    pub restored_receipts: ReceiptResult,
12}
13
14impl Debug for MigrationData {
15    fn fmt(&self, f: &mut Formatter<'_>) -> fmt::Result {
16        f.debug_struct("MigrationData").finish()
17    }
18}
19
20#[derive(Debug, Default)]
21pub struct MigrationFlags {
22    // True iff the current block is the first one in the chain with current protocol version
23    pub is_first_block_of_version: bool,
24    // True iff, among all blocks containing chunk for some specific shard, the current block is the
25    // first one in the first epoch with the current protocol version
26    pub is_first_block_with_chunk_of_version: bool,
27}