mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-25 07:27:18 +01:00
remove BSEnvironment changes, add logging to fromProtoBuffer
This commit is contained in:
parent
5d6537a0d2
commit
7db8b8ece3
2 changed files with 2 additions and 12 deletions
|
@ -194,17 +194,7 @@ public class BitsquareEnvironment extends StandardEnvironment {
|
||||||
propertySources.addLast(classpathProperties());
|
propertySources.addLast(classpathProperties());
|
||||||
|
|
||||||
String btcNetwork = BtcOptionKeys.BTC_NETWORK;
|
String btcNetwork = BtcOptionKeys.BTC_NETWORK;
|
||||||
log.info("btcnetwork = {}", btcNetwork);
|
bitcoinNetwork = BitcoinNetwork.valueOf(getProperty(btcNetwork, BitcoinNetwork.DEFAULT.name()).toUpperCase());
|
||||||
String name1 = BitcoinNetwork.DEFAULT.name();
|
|
||||||
log.info("name1 = {}", name1);
|
|
||||||
String name = name1;
|
|
||||||
try {
|
|
||||||
name = getProperty(btcNetwork, name1).toUpperCase();
|
|
||||||
} catch (Exception e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
log.info("name = {}", name);
|
|
||||||
bitcoinNetwork = BitcoinNetwork.valueOf(name);
|
|
||||||
btcNetworkDir = Paths.get(appDataDir, bitcoinNetwork.name().toLowerCase()).toString();
|
btcNetworkDir = Paths.get(appDataDir, bitcoinNetwork.name().toLowerCase()).toString();
|
||||||
File btcNetworkDirFile = new File(btcNetworkDir);
|
File btcNetworkDirFile = new File(btcNetworkDir);
|
||||||
if (!btcNetworkDirFile.exists())
|
if (!btcNetworkDirFile.exists())
|
||||||
|
|
|
@ -66,8 +66,8 @@ public class ProtoBufferUtilities {
|
||||||
|
|
||||||
|
|
||||||
public static Optional<Message> fromProtoBuf(Messages.Envelope envelope) {
|
public static Optional<Message> fromProtoBuf(Messages.Envelope envelope) {
|
||||||
|
log.info("Convert protobuffer envelope: {},{}", envelope.getMessageCase(), envelope.toString());
|
||||||
Message result = null;
|
Message result = null;
|
||||||
NodeAddress nodeAddress;
|
|
||||||
switch (envelope.getMessageCase()) {
|
switch (envelope.getMessageCase()) {
|
||||||
case PING:
|
case PING:
|
||||||
result = getPing(envelope);
|
result = getPing(envelope);
|
||||||
|
|
Loading…
Add table
Reference in a new issue