Skip to content

Commit 82f93ff

Browse files
author
Sunny Jiao
committed
add isSolidityRequest check for MaintenanceUnavailableException
1 parent 8d3b7da commit 82f93ff

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

framework/src/main/java/org/tron/core/Wallet.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@
174174
import org.tron.core.db.Manager;
175175
import org.tron.core.db.TransactionContext;
176176
import org.tron.core.db2.core.Chainbase;
177+
import org.tron.core.db2.core.Chainbase.Cursor;
177178
import org.tron.core.exception.AccountResourceInsufficientException;
178179
import org.tron.core.exception.BadItemException;
179180
import org.tron.core.exception.ContractExeException;
@@ -784,8 +785,10 @@ public WitnessList getPaginatedNowWitnessList(long offset, long limit) throws
784785
In the maintenance period, the VoteStores will be cleared.
785786
To avoid the race condition of VoteStores deleted but Witness vote counts not updated,
786787
return retry error.
788+
Only apply to non-solidity request.
787789
*/
788-
if (chainBaseManager.getDynamicPropertiesStore().getStateFlag() == 1) {
790+
boolean isSolidityRequest = Args.getInstance().isSolidityNode() || (getCursor() == Cursor.SOLIDITY);
791+
if (!isSolidityRequest && chainBaseManager.getDynamicPropertiesStore().getStateFlag() == 1) {
789792
String message =
790793
"Service temporarily unavailable during maintenance period. Please try again later.";
791794
throw new MaintenanceUnavailableException(message);

0 commit comments

Comments
 (0)