3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-13 02:35:52 +00:00

WalletTool: Use Wallet.hasKey() rather than Wallet.findKeyFromPubKey().

This commit is contained in:
Andreas Schildbach 2019-02-03 16:55:13 +01:00
parent 58ca1d1d8c
commit ac7a576b3d

View File

@ -1435,7 +1435,7 @@ public class WalletTool {
} else { } else {
throw new IllegalStateException(); throw new IllegalStateException();
} }
if (wallet.findKeyFromPubKey(key.getPubKey()) != null) { if (wallet.hasKey(key)) {
System.err.println("That key already exists in this wallet."); System.err.println("That key already exists in this wallet.");
return; return;
} }