1
0

Ensure that requirements are lowercase

This commit is contained in:
Jon Michael Aanes 2024-03-10 22:10:17 +01:00
parent be6974773b
commit dd26293da2
Signed by: Jmaa
SSH Key Fingerprint: SHA256:Ab0GfHGCblESJx7JRE4fj4bFy/KRpeLhi41y4pF3sNA

View File

@ -107,6 +107,12 @@ public final class PbcVanityAddressSearcher {
if (!prefix.startsWith("00")) { if (!prefix.startsWith("00")) {
throw new IllegalArgumentException("Vanity prefix must start with 00."); throw new IllegalArgumentException("Vanity prefix must start with 00.");
} }
if (!prefix.toLowerCase().equals(prefix)) {
throw new IllegalArgumentException("Vanity prefix must be lowercase");
}
if (!suffix.toLowerCase().equals(suffix)) {
throw new IllegalArgumentException("Vanity suffix must be lowercase");
}
} }
/** Whether the given address satisfies the requirements. */ /** Whether the given address satisfies the requirements. */