forked from Qortal/qortal
WIP: trade-bot: do not run trade-bot if not up-to-date
This commit is contained in:
parent
f179139967
commit
e729571a21
@ -155,6 +155,10 @@ public class TradeBot {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onChainTipChange() {
|
public void onChainTipChange() {
|
||||||
|
// No point doing anything on old/stale data
|
||||||
|
if (!Controller.getInstance().isUpToDate())
|
||||||
|
return;
|
||||||
|
|
||||||
if (!activeFlag.compareAndSet(false, true))
|
if (!activeFlag.compareAndSet(false, true))
|
||||||
// Trade bot already active on another thread
|
// Trade bot already active on another thread
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user