Fix to read 0x values for storage keys

This commit is contained in:
nicksavers 2014-10-09 17:46:16 +02:00
parent 33b59c6583
commit c2eff6bd93
2 changed files with 5 additions and 1 deletions

View File

@ -57,7 +57,11 @@ public class AccountState {
if (hexVal) {
key = new ByteArrayWrapper(Hex.decode(keyS.substring(2)));
} else {
byte[] data = ByteUtil.bigIntegerToBytes(new BigInteger(keyS));
byte[] data;
if (keyS != null && keyS.length() > 2)
data = Hex.decode(keyS);
else
data = new byte[0];
key = new ByteArrayWrapper(data);
}