Skip to content

Commit 4c7b699

Browse files
authored
Merge pull request #428 from tronprotocol/feature/new_resource_model
change protocol for new resource model
2 parents 8a79247 + 603edd5 commit 4c7b699

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

src/main/java/org/tron/walletcli/Client.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1204,7 +1204,7 @@ private void freezeBalance(String[] parameters)
12041204
|| parameters.length == 4 || parameters.length == 5)) {
12051205
System.out.println("Use freezeBalance command with below syntax: ");
12061206
System.out.println("freezeBalance [OwnerAddress] frozen_balance frozen_duration "
1207-
+ "[ResourceCode:0 BANDWIDTH,1 ENERGY] [receiverAddress]");
1207+
+ "[ResourceCode:0 BANDWIDTH,1 ENERGY,2 TRON_POWER] [receiverAddress]");
12081208
return;
12091209
}
12101210

@@ -1247,7 +1247,7 @@ private void unfreezeBalance(String[] parameters)
12471247
if (parameters == null || parameters.length < 1 || parameters.length > 3) {
12481248
System.out.println("Use unfreezeBalance command with below syntax: ");
12491249
System.out.println(
1250-
"unfreezeBalance [OwnerAddress] ResourceCode(0 BANDWIDTH,1 CPU) [receiverAddress]");
1250+
"unfreezeBalance [OwnerAddress] ResourceCode(0 BANDWIDTH,1 ENERGY,2 TRON_POWER) [receiverAddress]");
12511251
return;
12521252
}
12531253

src/main/protos/api/api.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1135,6 +1135,9 @@ message AccountResourceMessage {
11351135
map<string, int64> assetNetLimit = 6;
11361136
int64 TotalNetLimit = 7;
11371137
int64 TotalNetWeight = 8;
1138+
int64 TotalTronPowerWeight = 9;
1139+
int64 tronPowerUsed = 10;
1140+
int64 tronPowerLimit = 11;
11381141

11391142
int64 EnergyUsed = 13;
11401143
int64 EnergyLimit = 14;

src/main/protos/core/Tron.proto

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ message Account {
9797
//Freeze and provide balances to other accounts
9898
int64 delegated_frozen_balance_for_bandwidth = 42;
9999

100+
int64 old_tron_power = 46;
101+
Frozen tron_power = 47;
102+
100103
// this account create time
101104
int64 create_time = 0x09;
102105
// this last operation time, including transfer, voting and so on. //FIXME fix grammar

src/main/protos/core/contract/common.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@ option go_package = "github.com/tronprotocol/grpc-gateway/core";
99
enum ResourceCode {
1010
BANDWIDTH = 0x00;
1111
ENERGY = 0x01;
12+
TRON_POWER = 0x02;
1213
}

0 commit comments

Comments
 (0)