iota_graphql_rpc/types/safe_mode.rs
1// Copyright (c) Mysten Labs, Inc.
2// Modifications Copyright (c) 2024 IOTA Stiftung
3// SPDX-License-Identifier: Apache-2.0
4
5use async_graphql::*;
6
7use crate::types::gas::GasCostSummary;
8
9/// Information about whether epoch changes are using safe mode.
10#[derive(Clone, Debug, PartialEq, Eq, SimpleObject)]
11pub(crate) struct SafeMode {
12 /// Whether safe mode was used for the last epoch change. The system will
13 /// retry a full epoch change on every epoch boundary and automatically
14 /// reset this flag if so.
15 pub enabled: Option<bool>,
16
17 /// Accumulated fees for computation and cost that have not been added to
18 /// the various reward pools, because the full epoch change did not
19 /// happen.
20 pub gas_summary: Option<GasCostSummary>,
21}