From 5f1defc5a17deaab39a5385d57be51d03990c7fa Mon Sep 17 00:00:00 2001 From: sowle Date: Mon, 23 Sep 2024 05:19:58 +0200 Subject: [PATCH] core validation: additional condition validate_ado_ownership() --- src/currency_core/blockchain_storage.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/currency_core/blockchain_storage.cpp b/src/currency_core/blockchain_storage.cpp index 7e840273..168eedb3 100644 --- a/src/currency_core/blockchain_storage.cpp +++ b/src/currency_core/blockchain_storage.cpp @@ -4111,6 +4111,7 @@ bool validate_ado_ownership(asset_op_verification_context& avc) if (last_ado.descriptor.owner_eth_pub_key.has_value()) { + CHECK_AND_ASSERT_MES(last_ado.descriptor.owner == null_pkey, false, "owner_eth_pub_key is set but owner pubkey is nonzero"); asset_operation_ownership_proof_eth aoop_eth{}; r = get_type_in_variant_container(avc.tx.proofs, aoop_eth); CHECK_AND_ASSERT_MES(r, false, "Ownership validation failed: asset_operation_ownership_proof_eth is missing");