diff --git a/pom.xml b/pom.xml index 7951b033..fc6dfe24 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,6 @@ 1.76 1.76 4.4.0 - 22.2.0 1.6 4.0.1 1.4.2 @@ -804,90 +803,6 @@ ${json.version} - - tech.pegasys.discovery - discovery - ${discovery.version} - - - log4j-api - org.apache.logging.log4j - - - log4j-core - org.apache.logging.log4j - - - netty-all - io.netty - - - guava - com.google.guava - - - bcprov-jdk15on - org.bouncycastle - - - jackson-databind - com.fasterxml.jackson.core - - - logging-interceptor - com.squareup.okhttp3 - - - okhttp - com.squareup.okhttp3 - - - jackson-core - com.fasterxml.jackson.core - - - jffi - com.github.jnr - - - jnr-constants - com.github.jnr - - - jnr-ffi - com.github.jnr - - - vertx-core - io.vertx - - - bytes - org.apache.tuweni - - - units - org.apache.tuweni - - - slf4j-api - org.slf4j - - - tuweni-bytes - org.apache.tuweni - - - tuweni-io - org.apache.tuweni - - - tuweni-units - org.apache.tuweni - - - - com.github.briandilley.jsonrpc4j diff --git a/src/main/java/io/xdag/Wallet.java b/src/main/java/io/xdag/Wallet.java index 1c1fed2e..d9603e04 100644 --- a/src/main/java/io/xdag/Wallet.java +++ b/src/main/java/io/xdag/Wallet.java @@ -39,7 +39,7 @@ import io.xdag.crypto.Aes; import io.xdag.crypto.Bip32ECKeyPair; import io.xdag.crypto.Keys; -import io.xdag.crypto.MnemonicUtils; +import io.xdag.utils.MnemonicUtils; import io.xdag.crypto.Sign; import io.xdag.utils.Numeric; import io.xdag.utils.SimpleDecoder; diff --git a/src/main/java/io/xdag/cli/XdagCli.java b/src/main/java/io/xdag/cli/XdagCli.java index 6e9f643f..ae559ba0 100644 --- a/src/main/java/io/xdag/cli/XdagCli.java +++ b/src/main/java/io/xdag/cli/XdagCli.java @@ -32,7 +32,7 @@ import io.xdag.config.Config; import io.xdag.config.Constants; import io.xdag.crypto.Keys; -import io.xdag.crypto.MnemonicUtils; +import io.xdag.utils.MnemonicUtils; import io.xdag.crypto.Sign; import io.xdag.db.SnapshotStore; import io.xdag.db.rocksdb.DatabaseName; diff --git a/src/main/java/io/xdag/core/Block.java b/src/main/java/io/xdag/core/Block.java index 3aacbb72..88bc4ba1 100644 --- a/src/main/java/io/xdag/core/Block.java +++ b/src/main/java/io/xdag/core/Block.java @@ -222,7 +222,6 @@ public Block(BlockInfo blockInfo) { this.info = blockInfo; this.isSaved = true; this.parsed = true; - } /** diff --git a/src/main/java/io/xdag/crypto/Base58.java b/src/main/java/io/xdag/crypto/Base58.java index a2a4334d..b115b4f8 100644 --- a/src/main/java/io/xdag/crypto/Base58.java +++ b/src/main/java/io/xdag/crypto/Base58.java @@ -146,15 +146,6 @@ public static boolean checkAddress(String input) { return Arrays.equals(checksum, actualChecksum); } - public static boolean checkBytes24(byte[] data) { - if (data.length != 24) return false; - byte[] data20 = Arrays.copyOfRange(data, 0, data.length - 4); - byte[] checksum = Arrays.copyOfRange(data, data.length - 4, data.length); - byte[] actualChecksum = Arrays.copyOfRange(Hash.hashTwice(data20), 0, 4); - return Arrays.equals(checksum, actualChecksum); - } - - private static byte divmod(byte[] number, int firstDigit, int base, int divisor) { // this is just long division which accounts for the base of the input digits int remainder = 0; diff --git a/src/main/java/io/xdag/utils/WalletUtils.java b/src/main/java/io/xdag/utils/WalletUtils.java index cf8ba6cf..ce865b75 100644 --- a/src/main/java/io/xdag/utils/WalletUtils.java +++ b/src/main/java/io/xdag/utils/WalletUtils.java @@ -27,7 +27,6 @@ import io.xdag.Wallet; import io.xdag.crypto.Base58; import io.xdag.crypto.Bip32ECKeyPair; -import io.xdag.crypto.MnemonicUtils; import io.xdag.utils.exception.AddressFormatException; import lombok.extern.slf4j.Slf4j; import org.apache.tuweni.bytes.Bytes32; diff --git a/src/test/java/io/xdag/wallet/WalletUtilsTest.java b/src/test/java/io/xdag/wallet/WalletUtilsTest.java index e68ed5a5..4c656fb2 100644 --- a/src/test/java/io/xdag/wallet/WalletUtilsTest.java +++ b/src/test/java/io/xdag/wallet/WalletUtilsTest.java @@ -29,6 +29,7 @@ import io.xdag.config.DevnetConfig; import io.xdag.crypto.*; import io.xdag.utils.BytesUtils; +import io.xdag.utils.MnemonicUtils; import io.xdag.utils.WalletUtils; import org.apache.tuweni.bytes.Bytes32; import org.apache.tuweni.io.Base58;