From df1a4ad12e037ec0530f3d72b5afaabce8500678 Mon Sep 17 00:00:00 2001 From: Hansie Odendaal Date: Tue, 24 Oct 2023 14:03:25 +0200 Subject: [PATCH] review comments --- base_layer/core/src/proof_of_work/monero_rx/helpers.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/base_layer/core/src/proof_of_work/monero_rx/helpers.rs b/base_layer/core/src/proof_of_work/monero_rx/helpers.rs index cee12084c0..0d84745a1f 100644 --- a/base_layer/core/src/proof_of_work/monero_rx/helpers.rs +++ b/base_layer/core/src/proof_of_work/monero_rx/helpers.rs @@ -94,8 +94,8 @@ pub fn verify_header(header: &BlockHeader) -> Result>( ))); } // When we insert the merge mining tag, we need to make sure that the extra field is valid. - let mut extra_field = parse_extra_field_truncate_on_error(&block.miner_tx.prefix.extra); + let mut extra_field = ExtraField::try_parse(&block.miner_tx.prefix.extra) + .map_err(|_| MergeMineError::DeserializeError("Invalid extra field".to_string()))?; // Adding more than one merge mining tag is not allowed for item in &extra_field.0 {