3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-01 07:42:17 +00:00

Don't spam the log with setting key rotation time while loading wallets. Instead, print it with the wallet dump.

This commit is contained in:
Andreas Schildbach 2014-11-16 11:16:24 +01:00
parent 1db2316fc3
commit acad3e985d

View File

@ -2568,6 +2568,9 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha
// Do the keys.
builder.append("\nKeys:\n");
final long keyRotationTime = vKeyRotationTimestamp * 1000;
if (keyRotationTime > 0)
builder.append(String.format("Key rotation time: %s\n", Utils.dateTimeFormat(keyRotationTime)));
builder.append(keychain.toString(includePrivateKeys));
if (!watchedScripts.isEmpty()) {
@ -4383,9 +4386,6 @@ public class Wallet extends BaseTaggableObject implements Serializable, BlockCha
public void setKeyRotationTime(long unixTimeSeconds) {
checkArgument(unixTimeSeconds <= Utils.currentTimeSeconds());
vKeyRotationTimestamp = unixTimeSeconds;
if (unixTimeSeconds > 0) {
log.info("Key rotation time set: {}", unixTimeSeconds);
}
saveNow();
}