@@ -188,6 +188,7 @@ public class DynamicPropertiesStore extends TronStoreWithRevoking<BytesCapsule>
188188 "ALLOW_HIGHER_LIMIT_FOR_MAX_CPU_TIME_OF_ONE_TX" .getBytes ();
189189
190190 private static final byte [] MEMO_FEE = "MEMO_FEE" .getBytes ();
191+ private static final byte [] MEMO_FEE_HISTORY = "MEMO_FEE_HISTORY" .getBytes ();
191192
192193 @ Autowired
193194 private DynamicPropertiesStore (@ Value ("properties" ) String dbName ) {
@@ -863,7 +864,9 @@ private DynamicPropertiesStore(@Value("properties") String dbName) {
863864 try {
864865 this .getMemoFee ();
865866 } catch (IllegalArgumentException e ) {
866- this .saveMemoFee (CommonParameter .getInstance ().getMemoFee ());
867+ long memoFee = CommonParameter .getInstance ().getMemoFee ();
868+ this .saveMemoFee (memoFee );
869+ this .saveMemoFeeHistory ("0:" + memoFee );
867870 }
868871 }
869872
@@ -2547,6 +2550,17 @@ public void saveMemoFee(long value) {
25472550 this .put (MEMO_FEE , new BytesCapsule (ByteArray .fromLong (value )));
25482551 }
25492552
2553+ public String getMemoFeeHistory () {
2554+ return Optional .ofNullable (getUnchecked (MEMO_FEE_HISTORY ))
2555+ .map (BytesCapsule ::getData )
2556+ .map (ByteArray ::toStr )
2557+ .orElseThrow (() -> new IllegalArgumentException ("not found MEMO_FEE_HISTORY" ));
2558+ }
2559+
2560+ public void saveMemoFeeHistory (String value ) {
2561+ this .put (MEMO_FEE_HISTORY , new BytesCapsule (ByteArray .fromString (value )));
2562+ }
2563+
25502564 private static class DynamicResourceProperties {
25512565
25522566 private static final byte [] ONE_DAY_NET_LIMIT = "ONE_DAY_NET_LIMIT" .getBytes ();
0 commit comments