Skip to content

Commit f8b3472

Browse files
committed
feature: adapt to java-tron 4.3
- Add extra filed to internal transaction - Add energy used field to transaction extension
1 parent 9f211a9 commit f8b3472

File tree

3 files changed

+3
-0
lines changed

3 files changed

+3
-0
lines changed

src/main/java/org/tron/walletserver/WalletApi.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2186,6 +2186,7 @@ public boolean triggerContract(
21862186
System.out.println(
21872187
":" + ByteArray.toStr(transactionExtention.getResult().getMessage().toByteArray()));
21882188
System.out.println("Result:" + Hex.toHexString(result));
2189+
System.out.println("EnergyUsed:" + transactionExtention.getEnergyUsed());
21892190
return true;
21902191
}
21912192

src/main/protos/api/api.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,6 +1195,7 @@ message TransactionExtention {
11951195
bytes txid = 2; //transaction id = sha256(transaction.raw_data)
11961196
repeated bytes constant_result = 3;
11971197
Return result = 4;
1198+
uint64 EnergyUsed = 5;
11981199
}
11991200

12001201
message BlockExtention {

src/main/protos/core/Tron.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ message InternalTransaction {
539539
repeated CallValueInfo callValueInfo = 4;
540540
bytes note = 5;
541541
bool rejected = 6;
542+
string extra = 7;
542543
}
543544

544545
message DelegatedResourceAccountIndex {

0 commit comments

Comments
 (0)