Skip to content

Commit

Permalink
Add missing traits to actor state structs (#701)
Browse files Browse the repository at this point in the history
  • Loading branch information
connormullett authored Sep 22, 2022
1 parent ff1570f commit 2501329
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion actors/account/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use fvm_ipld_encoding::Cbor;
use fvm_shared::address::Address;

/// State includes the address for the actor
#[derive(Serialize_tuple, Deserialize_tuple, Debug)]
#[derive(Serialize_tuple, Deserialize_tuple, Debug, Clone)]
pub struct State {
pub address: Address,
}
Expand Down
2 changes: 1 addition & 1 deletion actors/cron/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use fvm_shared::address::Address;
use fvm_shared::MethodNum;

/// Cron actor state which holds entries to call during epoch tick
#[derive(Default, Serialize_tuple, Deserialize_tuple)]
#[derive(Default, Serialize_tuple, Deserialize_tuple, Clone, Debug)]
pub struct State {
/// Entries is a set of actors (and corresponding methods) to call during EpochTick.
pub entries: Vec<Entry>,
Expand Down
2 changes: 1 addition & 1 deletion actors/init/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use fvm_shared::error::ExitCode;
use fvm_shared::{ActorID, HAMT_BIT_WIDTH};

/// State is reponsible for creating
#[derive(Serialize_tuple, Deserialize_tuple)]
#[derive(Serialize_tuple, Deserialize_tuple, Clone, Debug)]
pub struct State {
pub address_map: Cid,
pub next_id: ActorID,
Expand Down
2 changes: 1 addition & 1 deletion actors/market/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ use super::types::*;
use super::{DealProposal, DealState};

/// Market actor state
#[derive(Clone, Default, Serialize_tuple, Deserialize_tuple)]
#[derive(Clone, Default, Serialize_tuple, Deserialize_tuple, Debug)]
pub struct State {
/// Proposals are deals that have been proposed and not yet cleaned up after expiry or termination.
/// Array<DealID, DealProposal>
Expand Down
2 changes: 1 addition & 1 deletion actors/miner/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub const SECTORS_AMT_BITWIDTH: u32 = 5;
/// that limits a miner actor's behavior (i.e. no balance withdrawals)
/// Excess balance as computed by st.GetAvailableBalance will be
/// withdrawable or usable for pre-commit deposit or pledge lock-up.
#[derive(Serialize_tuple, Deserialize_tuple, Clone)]
#[derive(Serialize_tuple, Deserialize_tuple, Clone, Debug)]
pub struct State {
/// Contains static info about this miner
pub info: Cid,
Expand Down
2 changes: 1 addition & 1 deletion actors/multisig/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use super::TxnID;
use crate::make_map_with_root;

/// Multisig actor state
#[derive(Serialize_tuple, Deserialize_tuple, Clone)]
#[derive(Serialize_tuple, Deserialize_tuple, Clone, Debug)]
pub struct State {
pub signers: Vec<Address>,
pub num_approvals_threshold: u64,
Expand Down
2 changes: 1 addition & 1 deletion actors/paych/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use fvm_shared::econ::TokenAmount;
/// A given payment channel actor is established by `from`
/// to enable off-chain microtransactions to `to` address
/// to be reconciled and tallied on chain.
#[derive(Debug, Serialize_tuple, Deserialize_tuple)]
#[derive(Debug, Serialize_tuple, Deserialize_tuple, Clone)]
pub struct State {
/// Channel owner, who has funded the actor.
pub from: Address,
Expand Down
2 changes: 1 addition & 1 deletion actors/power/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ lazy_static! {
}

/// Storage power actor state
#[derive(Default, Serialize_tuple, Deserialize_tuple)]
#[derive(Default, Serialize_tuple, Deserialize_tuple, Clone, Debug)]
pub struct State {
#[serde(with = "bigint_ser")]
pub total_raw_byte_power: StoragePower,
Expand Down
2 changes: 1 addition & 1 deletion actors/reward/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ lazy_static! {
}

/// Reward actor state
#[derive(Serialize_tuple, Deserialize_tuple, Default)]
#[derive(Serialize_tuple, Deserialize_tuple, Default, Debug, Clone)]
pub struct State {
/// Target CumsumRealized needs to reach for EffectiveNetworkTime to increase
/// Expressed in byte-epochs.
Expand Down
2 changes: 1 addition & 1 deletion actors/system/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ pub enum Method {
}

/// System actor state.
#[derive(Default, Deserialize_tuple, Serialize_tuple)]
#[derive(Default, Deserialize_tuple, Serialize_tuple, Debug, Clone)]
pub struct State {
// builtin actor registry: Vec<(String, Cid)>
pub builtin_actors: Cid,
Expand Down
2 changes: 1 addition & 1 deletion actors/verifreg/src/state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use fvm_ipld_encoding::Cbor;
use fvm_shared::address::Address;
use fvm_shared::HAMT_BIT_WIDTH;

#[derive(Serialize_tuple, Deserialize_tuple)]
#[derive(Serialize_tuple, Deserialize_tuple, Debug, Clone)]
pub struct State {
pub root_key: Address,
pub verifiers: Cid,
Expand Down

0 comments on commit 2501329

Please sign in to comment.