Skip to content

Commit

Permalink
feat(freezeV2): optimize msg format
Browse files Browse the repository at this point in the history
  • Loading branch information
lxcmyf committed Jun 9, 2023
1 parent eb8ffa1 commit b72d41a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ public boolean validate() throws ContractValidateException {
private void validRemainTime(ResourceCode resourceCode, long lockPeriod, long expireTime,
long now) throws ContractValidateException {
long remainTime = expireTime - now;
lockPeriod = lockPeriod == 0 ? DELEGATE_PERIOD / 3000 : lockPeriod;
if (lockPeriod * 3 * 1000 < remainTime) {
throw new ContractValidateException(
"The lock period for " + resourceCode.name() + " this time cannot be less than the "
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -717,7 +717,7 @@ public static void validator(DynamicPropertiesStore dynamicPropertiesStore,
if (value <= maxDelegateLockPeriod || value > 10512000L) {
throw new ContractValidateException(
"This value[MAX_DELEGATE_LOCK_PERIOD] is only allowed to be greater than "
+ maxDelegateLockPeriod + "and less than or equal to 10512000 !");
+ maxDelegateLockPeriod + " and less than or equal to 10512000 !");
}
if (dynamicPropertiesStore.getUnfreezeDelayDays() == 0) {
throw new ContractValidateException(
Expand Down

0 comments on commit b72d41a

Please sign in to comment.