Skip to content

Commit

Permalink
nbits completely removed
Browse files Browse the repository at this point in the history
  • Loading branch information
kushti committed Sep 1, 2024
1 parent bc66fdd commit 18b404a
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
4 changes: 0 additions & 4 deletions data/shared/src/main/scala/sigma/ast/methods.scala
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,6 @@ case object SBigIntMethods extends SNumericTypeMethods {
final val ToNBitsCostInfo = OperationCostInfo(
FixedCost(JitCost(5)), NamedDesc("NBitsMethodCall"))

//id = 8 to make it after toBits
val ToNBits = SMethod(this, "nbits", SFunc(this.ownerType, SLong), 8, ToNBitsCostInfo.costKind)
.withInfo(ModQ, "Encode this big integer value as NBits")

/** The following `modQ` methods are not fully implemented in v4.x and this descriptors.
* This descritors are remain here in the code and are waiting for full implementation
* is upcoming soft-forks at which point the cost parameters should be calculated and
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,4 @@ class MethodCallSerializerSpecification extends SerializationSpecification {
roundTripTest(expr)
}

property("MethodCall deserialization round trip for BigInt.nbits") {
def code = {
val bi = BigIntConstant(5)
val expr = MethodCall(bi,
SBigIntMethods.ToNBits,
Vector(),
Map()
)
roundTripTest(expr)
}

VersionContext.withVersions(VersionContext.V6SoftForkVersion, 1) {
code
}

an[ValidationException] should be thrownBy (
VersionContext.withVersions((VersionContext.V6SoftForkVersion - 1).toByte, 1) {
code
}
)
}
}

0 comments on commit 18b404a

Please sign in to comment.