From c844407f79954388c7d1c2bfefe850c88eca83e4 Mon Sep 17 00:00:00 2001 From: Alex Coats Date: Wed, 8 Nov 2023 13:38:10 -0500 Subject: [PATCH] fix implicit storage score --- sdk/src/types/block/address/implicit_account_creation.rs | 2 +- sdk/src/types/block/output/storage_score.rs | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sdk/src/types/block/address/implicit_account_creation.rs b/sdk/src/types/block/address/implicit_account_creation.rs index 702f559a52..36c51553d6 100644 --- a/sdk/src/types/block/address/implicit_account_creation.rs +++ b/sdk/src/types/block/address/implicit_account_creation.rs @@ -31,7 +31,7 @@ impl ImplicitAccountCreationAddress { impl StorageScore for ImplicitAccountCreationAddress { fn storage_score(&self, params: StorageScoreParameters) -> u64 { - params.implicit_account_creation_address_offset() + self.0.storage_score(params) + params.implicit_account_creation_address_offset() } } diff --git a/sdk/src/types/block/output/storage_score.rs b/sdk/src/types/block/output/storage_score.rs index 804e485517..a9fe029494 100644 --- a/sdk/src/types/block/output/storage_score.rs +++ b/sdk/src/types/block/output/storage_score.rs @@ -163,15 +163,13 @@ impl StorageScoreParameters { .finish() .unwrap() .storage_score(*self); - let ed25519_address_score = null_address.storage_score(*self); - let basic_score_without_address = basic_output_score - ed25519_address_score; let account_output_score = AccountOutputBuilder::new_with_amount(0, AccountId::null()) .add_unlock_condition(AddressUnlockCondition::new(null_address)) .add_feature(BlockIssuerFeature::new(0, [BlockIssuerKey::Ed25519(Ed25519BlockIssuerKey::null())]).unwrap()) .finish() .unwrap() .storage_score(*self); - account_output_score - basic_score_without_address + account_output_score - basic_output_score + null_address.storage_score(*self) } }