Improve documentation

This commit is contained in:
Christoph Atteneder 2019-06-21 11:21:30 +02:00 committed by Christoph Sturm
parent d0d819221d
commit ec6c23d09d
2 changed files with 11 additions and 2 deletions

View file

@ -56,6 +56,14 @@ public class TradeLimits {
// guice.
}
/**
* The default trade limits defined as statics in PaymentMethod are only used until the DAO
* is fully synchronized.
*
* @see bisq.core.payment.payload.PaymentMethod
* @return the maximum trade limit set by the DAO.
*/
public Coin getMaxTradeLimit() {
return daoStateService.getParamValueAsCoin(Param.MAX_TRADE_LIMIT, periodService.getChainHeight());
}

View file

@ -51,8 +51,9 @@ public final class PaymentMethod implements PersistablePayload, Comparable {
private static final long DAY = TimeUnit.HOURS.toMillis(24);
// Default trade limits.
// We initialize very early before reading persisted data. We will apply later the limit from the DAO param
// but that can be only done after the dao is initialized. The default values will be used for deriving the
// We initialize very early before reading persisted data. We will apply later the limit from
// the DAO param (Param.MAX_TRADE_LIMIT) but that can be only done after the dao is initialized.
// The default values will be used for deriving the
// risk factor so the relation between the risk categories stays the same as with the default values.
// We must not change those values as it could lead to invalid offers if amount becomes lower then new trade limit.
// Increasing might be ok, but needs more thought as well...