diff --git a/chain/indexer-primitives/src/lib.rs b/chain/indexer-primitives/src/lib.rs index a9fe48107d6..0dd90fe44ae 100644 --- a/chain/indexer-primitives/src/lib.rs +++ b/chain/indexer-primitives/src/lib.rs @@ -2,13 +2,13 @@ pub use near_primitives::hash::CryptoHash; pub use near_primitives::{self, types, views}; /// Resulting struct represents block with chunks -#[derive(Debug, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct StreamerMessage { pub block: views::BlockView, pub shards: Vec, } -#[derive(Debug, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IndexerChunkView { pub author: types::AccountId, pub header: views::ChunkHeaderView, @@ -34,7 +34,7 @@ pub struct IndexerExecutionOutcomeWithReceipt { pub receipt: views::ReceiptView, } -#[derive(Debug, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct IndexerShard { pub shard_id: types::ShardId, pub chunk: Option, diff --git a/core/primitives/src/views.rs b/core/primitives/src/views.rs index 8b9ccd1ee63..ade64f5a0cd 100644 --- a/core/primitives/src/views.rs +++ b/core/primitives/src/views.rs @@ -1123,7 +1123,7 @@ impl From for ShardChunkHeader { } } -#[derive(serde::Serialize, serde::Deserialize, Debug)] +#[derive(serde::Serialize, serde::Deserialize, Debug, Clone)] pub struct BlockView { pub author: AccountId, pub header: BlockHeaderView, @@ -2251,7 +2251,7 @@ impl From for StateChangeKindView { pub type StateChangesKindsView = Vec; /// See crate::types::StateChangeCause for details. -#[derive(Debug, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] #[serde(rename_all = "snake_case", tag = "type")] pub enum StateChangeCauseView { NotWritableToDisk, @@ -2296,7 +2296,7 @@ impl From for StateChangeCauseView { } #[serde_as] -#[derive(Debug, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] #[serde(rename_all = "snake_case", tag = "type", content = "change")] pub enum StateChangeValueView { AccountUpdate { @@ -2370,7 +2370,7 @@ impl From for StateChangeValueView { } } -#[derive(Debug, serde::Serialize, serde::Deserialize)] +#[derive(Clone, Debug, serde::Serialize, serde::Deserialize)] pub struct StateChangeWithCauseView { pub cause: StateChangeCauseView, #[serde(flatten)]