File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
framework/src/test/java/org/tron/core Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 7171import org .tron .core .capsule .VotesCapsule ;
7272import org .tron .core .capsule .WitnessCapsule ;
7373import org .tron .core .config .args .Args ;
74+ import org .tron .core .db2 .core .Chainbase ;
7475import org .tron .core .exception .ContractExeException ;
7576import org .tron .core .exception .ContractValidateException ;
7677import org .tron .core .exception .MaintenanceUnavailableException ;
@@ -867,6 +868,20 @@ public void testGetPaginatedNowWitnessList_Error() {
867868 Assert .assertTrue ("Should throw MaintenanceClearingException" ,
868869 e instanceof MaintenanceUnavailableException );
869870 }
871+
872+ try {
873+ Args .getInstance ().setSolidityNode (true );
874+ wallet .getPaginatedNowWitnessList (0 , 10 );
875+ Args .getInstance ().setSolidityNode (false );
876+
877+ dbManager .setCursor (Chainbase .Cursor .SOLIDITY );
878+ wallet .getPaginatedNowWitnessList (0 , 10 );
879+ dbManager .setCursor (Chainbase .Cursor .HEAD );
880+ } catch (Exception e ) {
881+ Assert .assertFalse ("Should not throw MaintenanceClearingException" ,
882+ e instanceof MaintenanceUnavailableException );
883+ }
884+
870885 dbManager .getChainBaseManager ().getDynamicPropertiesStore ().saveStateFlag (0 );
871886 }
872887
You can’t perform that action at this time.
0 commit comments