Skip to content

Commit

Permalink
Applied PR suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Jakub Zajkowski committed May 6, 2024
1 parent d5ae884 commit 8db5051
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion types/src/legacy_sse_data/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ fn maybe_translate_transaction_processed(
TransactionHash::Deploy(deploy_hash) => {
let account = match initiator_addr {
InitiatorAddr::PublicKey(public_key) => public_key,
InitiatorAddr::AccountHash(_) => return None, //This shouldn't happen since we alredy are in TransactionHas::Deploy
InitiatorAddr::AccountHash(_) => return None, //This shouldn't happen since we already are in TransactionHash::Deploy
};
let execution_result = match execution_result {
ExecutionResult::V1(result) => result.clone(),
Expand Down
14 changes: 7 additions & 7 deletions types/src/legacy_sse_data/translate_block_added.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::{
structs,
translate_deploy_hashes::{
DefaultDeployHashTranslator, DeployHashTranslator, TransferDeployHashTranslator,
StandardDeployHashesTranslator, DeployHashTranslator, TransferDeployHashesTranslator,
},
LegacySseData,
};
Expand Down Expand Up @@ -116,8 +116,8 @@ where
pub fn build_default_block_added_translator() -> DefaultBlockAddedTranslator<
DefaultBlockV2Translator<
DefaultEraEndV2Translator,
DefaultDeployHashTranslator,
TransferDeployHashTranslator,
StandardDeployHashesTranslator,
TransferDeployHashesTranslator,
>,
> {
DefaultBlockAddedTranslator {
Expand All @@ -127,13 +127,13 @@ pub fn build_default_block_added_translator() -> DefaultBlockAddedTranslator<

pub fn build_default_block_v2_translator() -> DefaultBlockV2Translator<
DefaultEraEndV2Translator,
DefaultDeployHashTranslator,
TransferDeployHashTranslator,
StandardDeployHashesTranslator,
TransferDeployHashesTranslator,
> {
DefaultBlockV2Translator {
era_end_translator: DefaultEraEndV2Translator,
deploy_hash_translator: DefaultDeployHashTranslator,
transfer_hash_translator: TransferDeployHashTranslator,
deploy_hash_translator: StandardDeployHashesTranslator,
transfer_hash_translator: TransferDeployHashesTranslator,
}
}

Expand Down
8 changes: 4 additions & 4 deletions types/src/legacy_sse_data/translate_deploy_hashes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ pub trait DeployHashTranslator {
}

#[derive(Default)]
pub struct DefaultDeployHashTranslator;
pub struct StandardDeployHashesTranslator;

#[derive(Default)]
pub struct TransferDeployHashTranslator;
pub struct TransferDeployHashesTranslator;

impl DeployHashTranslator for DefaultDeployHashTranslator {
impl DeployHashTranslator for StandardDeployHashesTranslator {
fn translate(&self, block_body_v2: &casper_types::BlockBodyV2) -> Vec<DeployHash> {
block_body_v2
.standard()
Expand All @@ -24,7 +24,7 @@ impl DeployHashTranslator for DefaultDeployHashTranslator {
}
}

impl DeployHashTranslator for TransferDeployHashTranslator {
impl DeployHashTranslator for TransferDeployHashesTranslator {
fn translate(&self, block_body_v2: &casper_types::BlockBodyV2) -> Vec<DeployHash> {
block_body_v2
.mint()
Expand Down

0 comments on commit 8db5051

Please sign in to comment.