Skip to content

Commit

Permalink
Now reports IP address
Browse files Browse the repository at this point in the history
  • Loading branch information
mtheory7 committed Aug 17, 2018
1 parent 6d3d9c3 commit 4c0175d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.mtheory7</groupId>
<artifactId>wyatt</artifactId>
<version>6.2.5</version>
<version>6.2.7</version>
<packaging>jar</packaging>

<name>wyatt</name>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/mtheory7/WyattApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class WyattApplication {

public static void main(String[] args) {
ConfigurableApplicationContext context = SpringApplication.run(WyattApplication.class, args);
logger.info("Starting WYATT (v6.2.5) ...");
logger.info("Starting WYATT (v6.2.7) ...");
if (args.length < 6) {
logger.error("Not enough arguments have been given");
System.exit(-1);
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/mtheory7/controller/WyattController.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ public void seppuku(@RequestParam("pass") String pass, HttpServletRequest reques
.hashString(pass, StandardCharsets.UTF_8)
.toString();
if (sha256hex.equals("bc159b2d00a17af10d15f85c0fc3050626a9de62ddada278c086b5a53c883464")) {
logger.info("Shutdown down now...");
logger.info("Shutdown received from IP-address: " + request.getRemoteUser());
System.exit(-1);
} else {
logger.info("Incorrect password provided from IP address: " + request.getRemoteAddr());
logger.info("Incorrect shutdown code from IP-address: " + request.getRemoteAddr());
}
}

Expand Down
8 changes: 4 additions & 4 deletions src/main/java/com/mtheory7/wyatt/mind/Wyatt.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
@Service
public class Wyatt {
private static final String BTCUSDT_TICKER = "BTCUSDT";
private static final boolean DEVELOPING = false;
private static final boolean DEVELOPMENT_MODE = false;
private static final Logger logger = Logger.getLogger(Wyatt.class);
private static final CandlestickInterval[] intervalList = {
CandlestickInterval.ONE_MINUTE, CandlestickInterval.THREE_MINUTES,
Expand Down Expand Up @@ -191,7 +191,7 @@ public void gatherMindData() {
* incremental amount of money.
*/
public void predictAndTrade() {
if (DEVELOPING) {
if (DEVELOPMENT_MODE) {
reportDevMode();
}
predictionEngine.executeThoughtProcess(mindData);
Expand Down Expand Up @@ -230,7 +230,7 @@ public void predictAndTrade() {
"Current buy back: " + currentMarginPercent + "% ($" + buyBackDifference + ")");
if (currentMarginPercent > 7.5) {
logger.trace("Deciding to submit a market buy back at $" + lastPriceFloored);
if (!DEVELOPING) {
if (!DEVELOPMENT_MODE) {
executeMarketBuyBack();
} else {
reportDevMode();
Expand All @@ -250,7 +250,7 @@ public void predictAndTrade() {
+ " Buy back: $"
+ buyBack;
logger.info(message);
if (!DEVELOPING) {
if (!DEVELOPMENT_MODE) {
performSellAndBuyBack(lastPriceFloored, buyBack, message);
} else {
reportDevMode();
Expand Down

0 comments on commit 4c0175d

Please sign in to comment.