forked from Qortal/qortal
Make sure the blockchain is synced before running any data publishing code.
This commit is contained in:
parent
2d2b2964a5
commit
0afb1a2d04
@ -855,6 +855,10 @@ public class ArbitraryResource {
|
||||
throw ApiExceptionFactory.INSTANCE.createCustomException(request, ApiError.INVALID_CRITERIA, error);
|
||||
}
|
||||
|
||||
if (!Controller.getInstance().isUpToDate()) {
|
||||
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.BLOCKCHAIN_NEEDS_SYNC);
|
||||
}
|
||||
|
||||
AccountData accountData = repository.getAccountRepository().getAccount(nameData.getOwner());
|
||||
if (accountData == null) {
|
||||
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.ADDRESS_UNKNOWN);
|
||||
|
Loading…
Reference in New Issue
Block a user