From 3f9791d86a3d0364091102fa058b32f89b780c2b Mon Sep 17 00:00:00 2001 From: Mike Hearn Date: Wed, 26 Mar 2014 23:55:42 +0100 Subject: [PATCH] HD Wallets: print seed birthday in wallet dump too --- .../java/com/google/bitcoin/wallet/KeyChainGroup.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/src/main/java/com/google/bitcoin/wallet/KeyChainGroup.java b/core/src/main/java/com/google/bitcoin/wallet/KeyChainGroup.java index 504688e4..cf71960c 100644 --- a/core/src/main/java/com/google/bitcoin/wallet/KeyChainGroup.java +++ b/core/src/main/java/com/google/bitcoin/wallet/KeyChainGroup.java @@ -29,10 +29,7 @@ import org.spongycastle.crypto.params.KeyParameter; import javax.annotation.Nullable; import java.security.SecureRandom; -import java.util.ArrayList; -import java.util.EnumMap; -import java.util.LinkedList; -import java.util.List; +import java.util.*; import java.util.concurrent.Executor; import static com.google.common.base.Preconditions.*; @@ -379,9 +376,15 @@ public class KeyChainGroup { builder.append("Seed as hex: "); builder.append(seed.toHexString()); builder.append(newline); + builder.append("Seed birthday: "); + builder.append(seed.getCreationTimeSeconds()); + builder.append(" [" + new Date(seed.getCreationTimeSeconds() * 1000) + "]"); + builder.append(newline); + builder.append(newline); } else { builder.append("Seed is encrypted"); builder.append(newline); + builder.append(newline); } for (ECKey key : chain.getKeys()) formatKeyWithAddress(params, includePrivateKeys, key, builder);