Skip to content

Commit

Permalink
Fix code quality issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cbeams committed Jan 17, 2020
1 parent 65175a7 commit 7595387
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions grpc/src/main/java/bisq/grpc/BisqGrpcClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import lombok.extern.slf4j.Slf4j;

import static com.google.common.base.Preconditions.checkArgument;
import static java.lang.String.format;



Expand Down Expand Up @@ -65,7 +66,6 @@
*/
@Slf4j
public class BisqGrpcClient {
private static BisqGrpcClient instance;

private final ManagedChannel channel;
private final GetVersionGrpc.GetVersionBlockingStub getVersionStub;
Expand All @@ -76,10 +76,9 @@ public class BisqGrpcClient {
private final GetPaymentAccountsGrpc.GetPaymentAccountsBlockingStub getPaymentAccountsStub;
private final PlaceOfferGrpc.PlaceOfferBlockingStub placeOfferBlockingStub;
private final CorePersistenceProtoResolver corePersistenceProtoResolver;
private final CoreNetworkProtoResolver coreNetworkProtoResolver;

public static void main(String[] args) throws Exception {
instance = new BisqGrpcClient("localhost", 8888);
new BisqGrpcClient("localhost", 8888);
}

private BisqGrpcClient(String host, int port) {
Expand Down Expand Up @@ -176,6 +175,8 @@ private BisqGrpcClient(String host, int port) {
stopServer();
result = "Server stopped";
break;
default:
result = format("Unknown command '%s'", command);
}

// First response is rather slow (300 ms) but following responses are fast (3-5 ms).
Expand All @@ -199,7 +200,7 @@ private BisqGrpcClient(ManagedChannel channel) {
placeOfferBlockingStub = PlaceOfferGrpc.newBlockingStub(channel);
stopServerStub = StopServerGrpc.newBlockingStub(channel);

coreNetworkProtoResolver = new CoreNetworkProtoResolver(Clock.systemDefaultZone());
CoreNetworkProtoResolver coreNetworkProtoResolver = new CoreNetworkProtoResolver(Clock.systemDefaultZone());
//TODO
corePersistenceProtoResolver = new CorePersistenceProtoResolver(null, coreNetworkProtoResolver, null, null);
}
Expand Down

0 comments on commit 7595387

Please sign in to comment.