From aef81ae63f8fb0e991f05dfc1dcec28b43c225cf Mon Sep 17 00:00:00 2001 From: Satya Date: Tue, 5 Sep 2023 13:13:09 +0800 Subject: [PATCH] fix: Added missing opcerts for pre-Babbage era --- .../core/model/serializers/BlockHeaderSerializer.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/core/src/main/java/com/bloxbean/cardano/yaci/core/model/serializers/BlockHeaderSerializer.java b/core/src/main/java/com/bloxbean/cardano/yaci/core/model/serializers/BlockHeaderSerializer.java index 01c4299..9b96a82 100644 --- a/core/src/main/java/com/bloxbean/cardano/yaci/core/model/serializers/BlockHeaderSerializer.java +++ b/core/src/main/java/com/bloxbean/cardano/yaci/core/model/serializers/BlockHeaderSerializer.java @@ -99,7 +99,14 @@ private BlockHeader preBabbageHeader(Array headerArray) { headerBodyBuilder.blockBodySize(CborSerializationUtil.toBigInteger(headerBodyArr.get(7)).longValue()); headerBodyBuilder.blockBodyHash(CborSerializationUtil.toHex(headerBodyArr.get(8))); -// headerBody.setOpCertificate() 4 items + //Operational Certificate 4 items + headerBodyBuilder.operationalCert(OperationalCert.builder() + .hotVKey(CborSerializationUtil.toHex(headerBodyArr.get(9))) + .sequenceNumber(CborSerializationUtil.toBigInteger(headerBodyArr.get(10)).intValue()) + .kesPeriod(CborSerializationUtil.toBigInteger(headerBodyArr.get(11)).intValue()) + .sigma(CborSerializationUtil.toHex(headerBodyArr.get(12))) + .build()); + ProtocolVersion protocolVersion = new ProtocolVersion(CborSerializationUtil.toBigInteger(headerBodyArr.get(13)).longValue(), CborSerializationUtil.toBigInteger(headerBodyArr.get(14)).longValue()); headerBodyBuilder.protocolVersion(protocolVersion);