Skip to content

Commit 6e76301

Browse files
committed
checkpointing: Pad the ECDSA toBytes instance
1 parent f4fa32b commit 6e76301

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/io/iohk/ethereum/crypto/ECDSASignature.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ case class ECDSASignature(r: BigInt, s: BigInt, v: Byte) {
174174
import ECDSASignature.RLength
175175

176176
def bigInt2Bytes(b: BigInt) =
177-
ByteString(ByteUtils.bigIntToBytes(b, RLength))
177+
ByteUtils.padLeft(ByteString(b.toByteArray).takeRight(RLength), RLength, 0)
178178

179179
bigInt2Bytes(r) ++ bigInt2Bytes(s) :+ v
180180
}

0 commit comments

Comments
 (0)