Skip to content

Commit

Permalink
unused env removed from reductionWithDeserialize
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Dec 6, 2024
1 parent 8993b3a commit 22ce03b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion data/shared/src/main/scala/sigma/ast/ErgoTree.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
* */
Expand Down Expand Up @@ -411,4 +411,5 @@ object ErgoTree {
def fromBytes(bytes: Array[Byte]): ErgoTree = {
ErgoTreeSerializer.DefaultSerializer.deserializeErgoTree(bytes)
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 22ce03b

Please sign in to comment.