Don't log from wallet in backtest mode
This commit is contained in:
parent
4899b06b31
commit
d652e6fcc4
@ -246,18 +246,21 @@ class Wallets:
|
|||||||
max_stake_amount = self.get_available_stake_amount()
|
max_stake_amount = self.get_available_stake_amount()
|
||||||
|
|
||||||
if min_stake_amount > max_stake_amount:
|
if min_stake_amount > max_stake_amount:
|
||||||
|
if self._log:
|
||||||
logger.warning("Minimum stake amount > available balance.")
|
logger.warning("Minimum stake amount > available balance.")
|
||||||
return 0
|
return 0
|
||||||
if min_stake_amount is not None and stake_amount < min_stake_amount:
|
if min_stake_amount is not None and stake_amount < min_stake_amount:
|
||||||
stake_amount = min_stake_amount
|
stake_amount = min_stake_amount
|
||||||
|
if self._log:
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Stake amount for pair {pair} is too small ({stake_amount} < {min_stake_amount}), "
|
f"Stake amount for pair {pair} is too small "
|
||||||
f"adjusting to {min_stake_amount}."
|
f"({stake_amount} < {min_stake_amount}), adjusting to {min_stake_amount}."
|
||||||
)
|
)
|
||||||
if stake_amount > max_stake_amount:
|
if stake_amount > max_stake_amount:
|
||||||
stake_amount = max_stake_amount
|
stake_amount = max_stake_amount
|
||||||
|
if self._log:
|
||||||
logger.info(
|
logger.info(
|
||||||
f"Stake amount for pair {pair} is too big ({stake_amount} > {max_stake_amount}), "
|
f"Stake amount for pair {pair} is too big "
|
||||||
f"adjusting to {max_stake_amount}."
|
f"({stake_amount} > {max_stake_amount}), adjusting to {max_stake_amount}."
|
||||||
)
|
)
|
||||||
return stake_amount
|
return stake_amount
|
||||||
|
Loading…
Reference in New Issue
Block a user