From 2d566604d8c48e83e5e7c7f3423ecf85ada7c1e1 Mon Sep 17 00:00:00 2001 From: nicksavers Date: Sat, 7 Jun 2014 19:13:56 +0200 Subject: [PATCH] Fix TransactionTest for zero nonce --- .../src/test/java/org/ethereum/core/TransactionTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ethereumj-core/src/test/java/org/ethereum/core/TransactionTest.java b/ethereumj-core/src/test/java/org/ethereum/core/TransactionTest.java index f38e0d1d..dbd98824 100644 --- a/ethereumj-core/src/test/java/org/ethereum/core/TransactionTest.java +++ b/ethereumj-core/src/test/java/org/ethereum/core/TransactionTest.java @@ -143,7 +143,7 @@ public class TransactionTest { assertEquals(HASH_TX, Hex.toHexString(txSigned.getHash())); assertEquals(RLP_ENCODED_SIGNED_TX, Hex.toHexString(txSigned.getEncoded())); - assertNull(txSigned.getNonce()); + assertEquals(BigInteger.ZERO, new BigInteger(1, txSigned.getNonce())); assertEquals(new BigInteger(1, testGasPrice), new BigInteger(1, txSigned.getGasPrice())); assertEquals(new BigInteger(1, testGasLimit), new BigInteger(1, txSigned.getGasLimit())); assertEquals(Hex.toHexString(testReceiveAddress), Hex.toHexString(txSigned.getReceiveAddress())); @@ -163,7 +163,7 @@ public class TransactionTest { txUnsigned.sign(Hex.decode(KEY)); assertEquals(RLP_ENCODED_SIGNED_TX, Hex.toHexString(txUnsigned.getEncoded())); - assertNull(txUnsigned.getNonce()); + assertEquals(BigInteger.ZERO, new BigInteger(1, txUnsigned.getNonce())); assertEquals(new BigInteger(1, testGasPrice), new BigInteger(1, txUnsigned.getGasPrice())); assertEquals(new BigInteger(1, testGasLimit), new BigInteger(1, txUnsigned.getGasLimit())); assertEquals(Hex.toHexString(testReceiveAddress), Hex.toHexString(txUnsigned.getReceiveAddress()));