Increase timeout for transaction submission via API POST /transactions/process from 500ms to 30s

This commit is contained in:
catbref 2020-03-23 10:54:35 +00:00
parent 5eafdf3c80
commit 1f0170bb4b

View File

@ -470,7 +470,7 @@ public class TransactionsResource {
throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_SIGNATURE); throw ApiExceptionFactory.INSTANCE.createException(request, ApiError.INVALID_SIGNATURE);
ReentrantLock blockchainLock = Controller.getInstance().getBlockchainLock(); ReentrantLock blockchainLock = Controller.getInstance().getBlockchainLock();
if (!blockchainLock.tryLock(500, TimeUnit.MILLISECONDS)) if (!blockchainLock.tryLock(30, TimeUnit.SECONDS))
throw createTransactionInvalidException(request, ValidationResult.NO_BLOCKCHAIN_LOCK); throw createTransactionInvalidException(request, ValidationResult.NO_BLOCKCHAIN_LOCK);
try { try {