Skip to content

Commit

Permalink
removing unused CSigmaDslBuilder.validationSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Aug 25, 2024
1 parent 6bb7fe7 commit bcfb24d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions data/shared/src/main/scala/sigma/ast/trees.scala
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ case class SubstConstants[T <: SType](scriptBytes: Value[SByteArray], positions:
val (newBytes, nConstants) = SubstConstants.eval(
scriptBytes = scriptBytesV.toArray,
positions = positionsV.toArray,
newVals = typedNewVals)(SigmaDsl.validationSettings)
newVals = typedNewVals)

res = Colls.fromArray(newBytes)
nConstants
Expand Down Expand Up @@ -684,7 +684,7 @@ object SubstConstants extends ValueCompanion {
*/
def eval(scriptBytes: Array[Byte],
positions: Array[Int],
newVals: Array[Constant[SType]])(implicit vs: SigmaValidationSettings): (Array[Byte], Int) =
newVals: Array[Constant[SType]]): (Array[Byte], Int) =
ErgoTreeSerializer.DefaultSerializer.substituteConstants(scriptBytes, positions, newVals)
}

Expand Down
3 changes: 1 addition & 2 deletions data/shared/src/main/scala/sigma/data/CSigmaDslBuilder.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ import java.math.BigInteger
* @see [[SigmaDslBuilder]] for detailed descriptions
*/
class CSigmaDslBuilder extends SigmaDslBuilder { dsl =>
implicit val validationSettings: SigmaValidationSettings = ValidationRules.currentSettings

override val Colls: CollBuilder = sigma.Colls

Expand Down Expand Up @@ -193,7 +192,7 @@ class CSigmaDslBuilder extends SigmaDslBuilder { dsl =>
case e: Throwable =>
throw new RuntimeException(s"Cannot evaluate substConstants($scriptBytes, $positions, $newValues)", e)
}
val (res, _) = SubstConstants.eval(scriptBytes.toArray, positions.toArray, constants)(validationSettings)
val (res, _) = SubstConstants.eval(scriptBytes.toArray, positions.toArray, constants)
Colls.fromArray(res)
}

Expand Down

0 comments on commit bcfb24d

Please sign in to comment.