From 22ce03bf0146217f1be3a7dc851c15cfaa8711e3 Mon Sep 17 00:00:00 2001 From: Alexander Chepurnoy Date: Fri, 6 Dec 2024 23:50:11 +0300 Subject: [PATCH] unused env removed from reductionWithDeserialize --- data/shared/src/main/scala/sigma/ast/ErgoTree.scala | 3 ++- .../main/scala/sigma/serialization/ErgoTreeSerializer.scala | 2 +- .../src/main/scala/sigmastate/interpreter/Interpreter.scala | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/data/shared/src/main/scala/sigma/ast/ErgoTree.scala b/data/shared/src/main/scala/sigma/ast/ErgoTree.scala index 8d731e1c67..ec902a20eb 100644 --- a/data/shared/src/main/scala/sigma/ast/ErgoTree.scala +++ b/data/shared/src/main/scala/sigma/ast/ErgoTree.scala @@ -375,7 +375,7 @@ object ErgoTree { * 3) write the `tree` to the Writer's buffer obtaining `treeBytes`; * 4) deserialize `tree` with ConstantPlaceholders. * - * @param headerFlags additional header flags to combine with + * @param header additional header flags to combine with * ConstantSegregationHeader flag. * @param prop expression to be transformed into ErgoTree * */ @@ -411,4 +411,5 @@ object ErgoTree { def fromBytes(bytes: Array[Byte]): ErgoTree = { ErgoTreeSerializer.DefaultSerializer.deserializeErgoTree(bytes) } + } diff --git a/data/shared/src/main/scala/sigma/serialization/ErgoTreeSerializer.scala b/data/shared/src/main/scala/sigma/serialization/ErgoTreeSerializer.scala index 1d14fcdc6b..affba713fc 100644 --- a/data/shared/src/main/scala/sigma/serialization/ErgoTreeSerializer.scala +++ b/data/shared/src/main/scala/sigma/serialization/ErgoTreeSerializer.scala @@ -74,7 +74,7 @@ import sigma.validation.ValidationRules.CheckPositionLimit * End of proof. * */ -class ErgoTreeSerializer(protocolVersion: Byte = VersionContext.V6SoftForkVersion) { +class ErgoTreeSerializer { /** Serialize header and constants section only.*/ private def serializeHeader(ergoTree: ErgoTree, w: SigmaByteWriter): Unit = { diff --git a/interpreter/shared/src/main/scala/sigmastate/interpreter/Interpreter.scala b/interpreter/shared/src/main/scala/sigmastate/interpreter/Interpreter.scala index a9474d0c6b..822bb8c351 100644 --- a/interpreter/shared/src/main/scala/sigmastate/interpreter/Interpreter.scala +++ b/interpreter/shared/src/main/scala/sigmastate/interpreter/Interpreter.scala @@ -239,8 +239,7 @@ trait Interpreter { /** Performs reduction of proposition which contains deserialization operations. */ private def reductionWithDeserialize(ergoTree: ErgoTree, prop: SigmaPropValue, - context: CTX, - env: ScriptEnv): ReductionResult = { + context: CTX): ReductionResult = { implicit val vs: SigmaValidationSettings = context.validationSettings val res = VersionContext.withScriptVersion(context.activatedScriptVersion) { val deserializeSubstitutionCost = java7.compat.Math.multiplyExact(ergoTree.bytes.length, CostPerTreeByte)