Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions tvm/src/cell/CellBuilder.kt
Original file line number Diff line number Diff line change
Expand Up @@ -161,8 +161,13 @@ public interface CellBuilder {
}
}

public fun storeBytes(byteArray: ByteArray, length: Int): CellBuilder
@Deprecated(
"Use storeBits(byteArray, bitLength) instead",
ReplaceWith("storeBits(byteArray, bitLength)")
)
public fun storeBytes(byteArray: ByteArray, bitLength: Int): CellBuilder = storeBits(byteArray, bitLength)

public fun storeBits(byteArray: ByteArray, bitLength: Int): CellBuilder
}

public inline operator fun CellBuilder.invoke(builder: CellBuilder.() -> Unit) {
Expand Down Expand Up @@ -244,9 +249,9 @@ private class CellBuilderImpl(
this.bits.plus(byteArrayOf(byte))
}

override fun storeBytes(byteArray: ByteArray, length: Int): CellBuilder = apply {
checkBitsOverflow(length)
this.bits.plus(byteArray, length)
override fun storeBits(byteArray: ByteArray, bitLength: Int): CellBuilder = apply {
checkBitsOverflow(bitLength)
this.bits.plus(byteArray, bitLength)
}

override fun storeRef(ref: Cell): CellBuilder = apply {
Expand Down