Fix bug where nonce was treated for RLP conversion as byte array when it is in fact a number

This commit is contained in:
nicksavers 2014-10-11 17:24:08 +02:00
parent 02c6f9c2aa
commit ebd13f8e9e
1 changed files with 1 additions and 1 deletions

View File

@ -60,7 +60,7 @@ public class HashUtil {
public static byte[] calcNewAddr(byte[] addr, byte[] nonce) { public static byte[] calcNewAddr(byte[] addr, byte[] nonce) {
byte[] encSender = RLP.encodeElement(addr); byte[] encSender = RLP.encodeElement(addr);
byte[] encNonce = RLP.encodeElement(nonce); byte[] encNonce = RLP.encodeBigInteger(new BigInteger(1, nonce));
byte[] newAddress = sha3omit12(RLP.encodeList(encSender, encNonce)); byte[] newAddress = sha3omit12(RLP.encodeList(encSender, encNonce));
return newAddress; return newAddress;