@@ -61,6 +61,8 @@ public class DynamicPropertiesStore extends TronStoreWithRevoking<BytesCapsule>
6161 private static final byte [] NON_EXISTENT_ACCOUNT_TRANSFER_MIN = "NON_EXISTENT_ACCOUNT_TRANSFER_MIN"
6262 .getBytes ();
6363
64+ private static final byte [] OPERATING_TIME_INTERVAL = "OPERATING_TIME_INTERVAL" .getBytes ();
65+
6466 @ Autowired
6567 private DynamicPropertiesStore (@ Qualifier ("properties" ) String dbName ) {
6668 super (dbName );
@@ -172,6 +174,14 @@ private DynamicPropertiesStore(@Qualifier("properties") String dbName) {
172174 this .saveNonExistentAccountTransferLimit (1_000_000L );
173175 }
174176
177+
178+ try {
179+ this .getOperatingTimeInterval ();
180+ } catch (IllegalArgumentException e ) {
181+ this .saveOperatingTimeInterval (10_000L );
182+ }
183+
184+
175185 try {
176186 this .getBlockFilledSlotsNumber ();
177187 } catch (IllegalArgumentException e ) {
@@ -402,6 +412,22 @@ public long getNonExistentAccountTransferMin() {
402412 () -> new IllegalArgumentException ("not found NON_EXISTENT_ACCOUNT_TRANSFER_MIN" ));
403413 }
404414
415+
416+ public void saveOperatingTimeInterval (long time ) {
417+ logger .debug ("NON_EXISTENT_ACCOUNT_TRANSFER_MIN:" + time );
418+ this .put (OPERATING_TIME_INTERVAL ,
419+ new BytesCapsule (ByteArray .fromLong (time )));
420+ }
421+
422+ public long getOperatingTimeInterval () {
423+ return Optional .ofNullable (this .dbSource .getData (OPERATING_TIME_INTERVAL ))
424+ .map (ByteArray ::toLong )
425+ .orElseThrow (
426+ () -> new IllegalArgumentException ("not found OPERATING_TIME_INTERVAL" ));
427+ }
428+
429+
430+
405431 public void saveBlockFilledSlots (int [] blockFilledSlots ) {
406432 logger .debug ("blockFilledSlots:" + intArrayToString (blockFilledSlots ));
407433 this .put (BLOCK_FILLED_SLOTS ,
0 commit comments