mirror of
https://github.com/Qortal/altcoinj.git
synced 2025-02-12 02:05:53 +00:00
Allow setting the creation time for newly created keys (this is useful for testing)
This commit is contained in:
parent
d3a540bb1e
commit
04772a7aa8
@ -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.");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user