From a1b59c3ed744e0710000c0112b438abcd51c1c82 Mon Sep 17 00:00:00 2001
From: William Wolff <wolff.william@pm.me>
Date: Tue, 27 Aug 2024 18:46:36 +0200
Subject: [PATCH] fix(LW-11296): temporary fix for protocol parameter entropy
 reset

---
 packages/core/src/Serialization/Update/ProtocolParamUpdate.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/packages/core/src/Serialization/Update/ProtocolParamUpdate.ts b/packages/core/src/Serialization/Update/ProtocolParamUpdate.ts
index c852f8ed1c5..ce1bbdc8d4c 100644
--- a/packages/core/src/Serialization/Update/ProtocolParamUpdate.ts
+++ b/packages/core/src/Serialization/Update/ProtocolParamUpdate.ts
@@ -324,11 +324,11 @@ export class ProtocolParamUpdate {
         case 13n: {
           // entropy is encoded as an array of two elements, where the second elements is the entropy value
           const size = reader.readStartArray();
+          reader.readEncodedValue();
+
           if (size === 1) {
-            reader.readEncodedValue();
             reader.readEndArray();
           } else {
-            reader.readEncodedValue();
             params.#extraEntropy = HexBlob.fromBytes(reader.readByteString());
             reader.readEndArray();
           }