WalletTool: Warn if an uncompressed key was imported.

This commit is contained in:
Andreas Schildbach 2019-02-04 12:09:49 +01:00
parent 480150f87f
commit 72f78041ac

View File

@ -1440,11 +1440,15 @@ public class WalletTool {
return; // Error message already printed.
key = key.encrypt(checkNotNull(wallet.getKeyCrypter()), aesKey);
}
wallet.importKey(key);
System.out.println(LegacyAddress.fromKey(params, key) + " " + key);
} catch (KeyCrypterException kce) {
System.err.println("There was an encryption related error when adding the key. The error was '" + kce.getMessage() + "'.");
System.err.println("There was an encryption related error when adding the key. The error was '"
+ kce.getMessage() + "'.");
return;
}
if (!key.isCompressed())
System.out.println("WARNING: Importing an uncompressed key");
wallet.importKey(key);
System.out.println(LegacyAddress.fromKey(params, key) + " " + key);
}
/**