cryptoeax / arbbot

Arbitrator, a bitcoin/altcoin arbitrage trading bot
https://gitter.im/cryptoeax-arbbot/Lobby
GNU General Public License v3.0
199 stars 78 forks source link

refreshWallets twice? #71

Closed arvasko closed 6 years ago

arvasko commented 6 years ago

At Arbitrator->loop(), there is a test condition to refresh wallets only if one hour (3600secs) has past. But then right below, outside the IF condition, there is a refreshWallets again. That makes wallets to be refreshed after 1 sec, right? Is it a bug?

arvasko commented 6 years ago

`private function loop() {

Config::refresh();

if ( time() > $this->nextCoinUpdate ) {
  if (!$this->walletsRefreshed) {
    $this->refreshWallets(); /* here is ok */
  }
  $this->refreshCoinPairs();
  $this->nextCoinUpdate = time() + 3600;
}

$this->refreshWallets(); /* again? isn`t this skipping the one hour condition?`
cryptoeax commented 6 years ago

The code you're complaining about is too old, it's already been removed in 66049a1b78d09666cfe40209f93052ad6a962f11. (Please update regularly, this project is under active development!)