3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-12 18:25:51 +00:00

Allow setting the creation time for newly created keys (this is useful for testing)

This commit is contained in:
Mike Hearn 2012-09-09 15:25:58 +02:00
parent d3a540bb1e
commit 04772a7aa8

View File

@ -608,6 +608,8 @@ public class WalletTool {
} else { } else {
// Freshly generated key. // Freshly generated key.
key = new ECKey(); key = new ECKey();
if (creationTimeSeconds > 0)
key.setCreationTimeSeconds(creationTimeSeconds);
} }
if (wallet.findKeyFromPubKey(key.getPubKey()) != null) { if (wallet.findKeyFromPubKey(key.getPubKey()) != null) {
System.err.println("That key already exists in this wallet."); System.err.println("That key already exists in this wallet.");