Skip to content

Commit

Permalink
Merge pull request #730 from tronprotocol/release_v4.7.5
Browse files Browse the repository at this point in the history
feat(merge): merge release_v4.7.5 into master
  • Loading branch information
lvs007 authored Jun 5, 2024
2 parents c018da6 + cd9daf2 commit e876f25
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 26 deletions.
36 changes: 16 additions & 20 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,9 @@ buildscript {
}
ext {
projectVersion = '1.3.0-RELEASE'
grpcVersion = '1.6.1'
protobufVersion = '3.3.0'
grpcVersion = '1.60.0'
protobufVersion = '3.21.12'
protobufGradlePluginVersion = '0.8.0'
springCloudConsulVersion = '1.2.1.RELEASE'
}

dependencies {
Expand All @@ -63,44 +62,40 @@ task wrapper(type: Wrapper) {
}

dependencies {
compile group: 'junit', name: 'junit', version: '4.12'
compile group: 'com.beust', name: 'jcommander', version: '1.72'
compile group: 'junit', name: 'junit', version: '4.13.2'
compile group: 'com.beust', name: 'jcommander', version: '1.82'
//compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'org.slf4j', name: 'jcl-over-slf4j', version: '1.7.25'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
compile 'com.maxmind.geoip2:geoip2:2.10.0'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.13'

// google grpc
compile group: 'io.grpc', name: 'grpc-netty', version: '1.9.0'
compile group: 'io.grpc', name: 'grpc-protobuf', version: '1.9.0'
compile group: 'io.grpc', name: 'grpc-stub', version: '1.9.0'
compile group: 'io.grpc', name: 'grpc-netty', version: "${grpcVersion}"
compile group: 'io.grpc', name: 'grpc-protobuf', version: "${grpcVersion}"
compile group: 'io.grpc', name: 'grpc-stub', version: "${grpcVersion}"

compile group: 'com.googlecode.protobuf-java-format', name: 'protobuf-java-format', version: '1.4'
compile group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: '1.69'
compile group: 'org.bouncycastle', name: 'bcprov-jdk18on', version: '1.78.1'
compile group: 'com.typesafe', name: 'config', version: '1.3.2'
compile "com.google.code.findbugs:jsr305:3.0.0"
compile "org.springframework.cloud:spring-cloud-starter-consul-discovery:${springCloudConsulVersion}"
compile "org.apache.commons:commons-collections4:4.0"
compile "org.apache.commons:commons-lang3:3.4"
compile "org.apache.commons:commons-lang3:3.14.0"
compile group: 'com.google.api.grpc', name: 'googleapis-common-protos', version: '0.0.3'
compile 'com.alibaba:fastjson:1.2.76'
compile 'com.alibaba:fastjson:1.2.83'

compile group: 'commons-io', name: 'commons-io', version: '2.6'
compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.16.1'
compile group: 'org.projectlombok', name: 'lombok', version: '1.18.2'

compile group: 'org.jline', name: 'jline', version: '3.15.0'
compile group: 'org.jline', name: 'jline', version: '3.25.0'
compile 'io.github.tronprotocol:zksnark-java-sdk:1.0.0'
}

protobuf {
generatedFilesBaseDir = "$projectDir/src/"
protoc {
artifact = "com.google.protobuf:protoc:3.5.1-1"
artifact = "com.google.protobuf:protoc:${protobufVersion}"

}
plugins {
grpc {
artifact = 'io.grpc:protoc-gen-grpc-java:1.9.0'
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
Expand Down Expand Up @@ -129,4 +124,5 @@ shadowJar {
baseName = 'wallet-cli'
classifier = null
version = null
mergeServiceFiles() // https://github.com/grpc/grpc-java/issues/10853
}
3 changes: 1 addition & 2 deletions src/main/java/org/tron/demo/ECKeyDemo.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import java.math.BigInteger;
import java.util.Arrays;
import org.bouncycastle.math.ec.ECPoint;
import org.springframework.util.StringUtils;
import org.tron.common.crypto.ECKey;
import org.tron.common.crypto.Hash;
import org.tron.common.crypto.Sha256Sm3Hash;
Expand Down Expand Up @@ -50,7 +49,7 @@ public static String address2Encode58CheckDemo(byte[] input) {

private static String private2Address(byte[] privateKey) throws CipherException {
ECKey eCkey;
if (StringUtils.isEmpty(privateKey)) {
if (privateKey == null ) {
eCkey = new ECKey(Utils.getRandom()); // Gen new Keypair
} else {
eCkey = ECKey.fromPrivate(privateKey);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/tron/demo/SelectFileDemo.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package org.tron.demo;

import org.apache.commons.lang.ArrayUtils;
import org.apache.commons.lang3.ArrayUtils;

import java.io.File;
import java.io.IOException;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/org/tron/walletcli/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -4399,6 +4399,7 @@ private void run() {
LineReader lineReader = LineReaderBuilder.builder()
.terminal(terminal)
.completer(commandCompleter)
.option(LineReader.Option.CASE_INSENSITIVE, true)
.build();
String prompt = "wallet> ";

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/tron/walletserver/GrpcClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import io.grpc.ManagedChannel;
import io.grpc.ManagedChannelBuilder;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.lang3.StringUtils;
import org.tron.api.GrpcAPI;
import org.tron.api.GrpcAPI.*;
import org.tron.api.GrpcAPI.Return.response_code;
Expand Down Expand Up @@ -96,13 +96,13 @@ public class GrpcClient {
public GrpcClient(String fullnode, String soliditynode) {
if (!StringUtils.isEmpty(fullnode)) {
channelFull = ManagedChannelBuilder.forTarget(fullnode)
.usePlaintext(true)
.usePlaintext()
.build();
blockingStubFull = WalletGrpc.newBlockingStub(channelFull);
}
if (!StringUtils.isEmpty(soliditynode)) {
channelSolidity = ManagedChannelBuilder.forTarget(soliditynode)
.usePlaintext(true)
.usePlaintext()
.build();
blockingStubSolidity = WalletSolidityGrpc.newBlockingStub(channelSolidity);
blockingStubExtension = WalletExtensionGrpc.newBlockingStub(channelSolidity);
Expand Down

0 comments on commit e876f25

Please sign in to comment.