Skip to content

Commit 82d1639

Browse files
committed
feat(vm): use TRX_PRECISION
1 parent 81cfba2 commit 82d1639

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

actuator/src/main/java/org/tron/core/vm/repository/RepositoryImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -966,10 +966,10 @@ private boolean hardenResourceCalculation() {
966966

967967
public long calculateGlobalEnergyLimit(AccountCapsule accountCapsule) {
968968
long frozeBalance = accountCapsule.getAllFrozenBalanceForEnergy();
969-
if (frozeBalance < precision) {
969+
if (frozeBalance < TRX_PRECISION) {
970970
return 0;
971971
}
972-
long energyWeight = frozeBalance / precision;
972+
long energyWeight = frozeBalance / TRX_PRECISION;
973973
long totalEnergyLimit = getDynamicPropertiesStore().getTotalEnergyCurrentLimit();
974974
long totalEnergyWeight = getDynamicPropertiesStore().getTotalEnergyWeight();
975975

0 commit comments

Comments
 (0)