From 858046ec2f193d76fea5d2566b36e30be62ace5e Mon Sep 17 00:00:00 2001 From: gubatron Date: Mon, 19 Jan 2015 20:11:23 -0500 Subject: [PATCH] init account's ecKey and address, avoid reported NPE --- ethereumj-core/src/main/java/org/ethereum/core/Wallet.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ethereumj-core/src/main/java/org/ethereum/core/Wallet.java b/ethereumj-core/src/main/java/org/ethereum/core/Wallet.java index 81c1826d..6adb7181 100644 --- a/ethereumj-core/src/main/java/org/ethereum/core/Wallet.java +++ b/ethereumj-core/src/main/java/org/ethereum/core/Wallet.java @@ -80,6 +80,7 @@ public class Wallet { public void addNewAccount() { Account account = new Account(); + account.init(); String address = Hex.toHexString(account.getEcKey().getAddress()); rows.put(address, account); for (WalletListener listener : listeners)