Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2045 commits
Select commit Hold shift + click to select a range
9998965
Merge remote-tracking branch 'origin/test/4.1_case' into test/4.1_case
Oct 13, 2020
aaf03ec
modify stackSuicide Testcase
MiraculousWang Oct 13, 2020
8782592
Merge branch 'test/4.1_case' of https://github.com/tronprotocol/java-…
MiraculousWang Oct 13, 2020
80cfe15
change test cases
Oct 14, 2020
3fdbb7a
change test case
Oct 14, 2020
e590e98
change istanbul
Oct 15, 2020
1e6b2a7
Turn sr reward test case off
pangpangfeng Oct 15, 2020
5b88857
change test case
Oct 15, 2020
ace73c5
add test case
Oct 15, 2020
adfded6
Merge pull request #3441 from tronprotocol/remove_getSrReward_case
wangzichichi Oct 15, 2020
5fe4f9e
change test case
Oct 15, 2020
00c6a7c
move exception to common package
helloboy12345 Oct 17, 2020
16763c6
fix check style problem
helloboy12345 Oct 17, 2020
f505587
Improve tvm unstake test case
Oct 19, 2020
3dd1953
Merge remote-tracking branch 'origin/test/4.1_case' into test/4.1_case
Oct 19, 2020
6deb34b
Update Constant.java
RoddyZuy Oct 20, 2020
a33e427
Update Peer.java
RoddyZuy Oct 20, 2020
5fbd3d8
Update Args.java
RoddyZuy Oct 20, 2020
529231f
Update BaseNet.java
RoddyZuy Oct 20, 2020
a8f6f26
Update BaseNet.java
RoddyZuy Oct 20, 2020
ed18863
Update BaseNet.java
RoddyZuy Oct 20, 2020
3ddc9fc
Merge pull request #3451 from RoddyZuy/develop
zk19862018 Oct 20, 2020
01dc659
Merge pull request #3446 from helloboy12345/develop
jwrct Oct 20, 2020
0c91cb7
simplify code with common functions
kaiserlinda Oct 20, 2020
b45872f
refactor code structure and remove unused code
hellovickytian Oct 20, 2020
7f35af8
Merge pull request #3452 from kaiserlinda/simplify_code
jwrct Oct 20, 2020
496abc6
Merge pull request #3444 from hellovickytian/develop
jwrct Oct 20, 2020
187257b
ping timeout configurable
paoerpaul Oct 20, 2020
e333db0
Merge branch 'develop' of https://github.com/tronprotocol/java-tron i…
paoerpaul Oct 20, 2020
86b1ed6
add config test
paoerpaul Oct 20, 2020
a73b4a0
Update MetricsApiService.java
BigFernando Oct 20, 2020
d1e5fd5
Update PeerConnection.java
BigFernando Oct 20, 2020
509c306
Update BlockMsgHandler.java
BigFernando Oct 20, 2020
77631a3
Update MetricsUtil.java
BigFernando Oct 20, 2020
9eecb76
Update MetricsUtil.java
BigFernando Oct 21, 2020
de7788f
Update PeerConnection.java
BigFernando Oct 21, 2020
868fb6e
Update MetricsUtil.java
BigFernando Oct 21, 2020
8db4691
Update PeerConnection.java
BigFernando Oct 21, 2020
3eec799
Merge pull request #3458 from BigFernando/develop
zk19862018 Oct 21, 2020
b9b6b0b
Merge pull request #3454 from paoerpaul/discover_ping_timeout_configu…
jwrct Oct 21, 2020
2a54809
Merge branch 'develop' of https://github.com/tronprotocol/java-tron i…
EleanoraJo Oct 21, 2020
4d4fe0a
optimization get market interface
EleanoraJo Oct 22, 2020
3ed58bd
Merge pull request #3460 from EleanoraJo/if_optimization
jwrct Oct 22, 2020
1417669
Merge branch 'develop' of https://github.com/tronprotocol/java-tron i…
pangpangfeng Oct 23, 2020
8d029c5
Add tvm assetissuue suicide testcase
Oct 23, 2020
1118107
Improve tvm assetissue solidity
Oct 23, 2020
2136608
Improve tvm asesetissue suicide test case
Oct 23, 2020
5e9ac07
change test cases
Oct 23, 2020
ff65962
Set tvm assetissue testcase false
Oct 26, 2020
198248a
Add http trondex test case
Oct 26, 2020
4cbe766
Merge remote-tracking branch 'origin/test/4.1_case' into test/4.1_case
Oct 26, 2020
d002bc6
Change checkstyle
Oct 27, 2020
7752909
Merge pull request #3470 from tronprotocol/test/4.1_case
wangqqqqq Oct 27, 2020
8969889
add beforeSuite delete
MiraculousWang Oct 27, 2020
46a0786
Merge pull request #3471 from tronprotocol/test/4.1_case
MiraculousWang Oct 27, 2020
63242ae
Merge branch 'develop' of https://github.com/tronprotocol/java-tron i…
pangpangfeng Oct 27, 2020
3001796
Improve batchValidateSign test case
Oct 27, 2020
ba087f0
Merge remote-tracking branch 'origin/test/4.1_case' into test/4.1_case
Oct 27, 2020
331deb3
delete OUT_OF_TIME message check
MiraculousWang Oct 28, 2020
900dbcf
Merge branch 'test/4.1_case' of https://github.com/tronprotocol/java-…
MiraculousWang Oct 28, 2020
74002b7
modify create2 testcast
MiraculousWang Oct 28, 2020
d784bfb
Merge branch 'test/4.1_case' of https://github.com/tronprotocol/java-…
pangpangfeng Oct 29, 2020
8b6d24a
Modify stest description
pangpangfeng Oct 29, 2020
cafade8
Merge branch 'develop' into test/4.1_case
pangpangfeng Oct 29, 2020
e8876bd
Merge pull request #3474 from tronprotocol/test/4.1_case
wangzichichi Oct 30, 2020
af76742
add transaction fee pool
sean-liu55 Nov 11, 2020
4fe888b
rm useless code
sean-liu55 Nov 11, 2020
ed50dba
add transactionFeePool proposal
sean-liu55 Nov 11, 2020
dcd849a
rm todo comment
sean-liu55 Nov 11, 2020
ef538d3
add chainParameter
sean-liu55 Nov 11, 2020
ab1b524
add BlockHash and assembly test
MiraculousWang Nov 11, 2020
12d2492
Transfer the fee to the SR but not to voters
sean-liu55 Nov 11, 2020
8b50e9c
don't transaction fee to SR if the transaction is out of time
sean-liu55 Nov 11, 2020
5129267
merge master
tomatoishealthy Nov 12, 2020
53aa546
fix sonar check
tomatoishealthy Nov 12, 2020
f6f9f2e
Merge branch 'develop' into test/4.1_case
Nov 12, 2020
df916b1
typo: remove unused code
Nov 13, 2020
c6aa01d
base on GreatVoyage-v4.1.1
Yrp Nov 13, 2020
07704b9
Add selector and stringSplit solidity testcase
Nov 13, 2020
3274693
Improve ContractInternalTransaction003
Nov 13, 2020
2f95c98
Change checkstyle
Nov 13, 2020
b0319f0
Merge pull request #3502 from tronprotocol/test/4.1_case
MiraculousWang Nov 13, 2020
9802248
init transaction fee pool
sean-liu55 Nov 14, 2020
ee36a24
Merge remote-tracking branch 'origin/feature/sr_fee_model' into featu…
sean-liu55 Nov 14, 2020
9905db5
rm unused import
tomatoishealthy Nov 16, 2020
10b9144
optimize redundant code
kaiserlinda Nov 16, 2020
7e82284
optimizing code with unified functions
paoerpaul Nov 16, 2020
b2f8e90
Merge pull request #3508 from paoerpaul/code_optimizing
jwrct Nov 16, 2020
199b024
Merge pull request #3507 from kaiserlinda/optimize_redundant_code
jwrct Nov 16, 2020
57b909b
Merge pull request #3496 from guoquanwu/master_to_develop
tomatoishealthy Nov 16, 2020
75c4d3b
transfer transaction fee to voters
sean-liu55 Nov 16, 2020
5cc721e
rm useless code
sean-liu55 Nov 16, 2020
30e27df
add receive type to support solidity 0.6.0
Nov 17, 2020
c018255
Improve internalTransaction003 testcase
Nov 17, 2020
d8bbaeb
fix the node start error (#3473)
lvs007 Oct 28, 2020
490f0b2
revert SR reward
tomatoishealthy Nov 17, 2020
a35fcd4
Improve checkstyle
Nov 17, 2020
a35735f
Merge pull request #3511 from guoquanwu/develop
tomatoishealthy Nov 18, 2020
de47f07
Merge pull request #3510 from tronprotocol/test/4.1_case
wangqqqqq Nov 19, 2020
01a4c23
add Pure StateMutabilityType
Nov 19, 2020
6e050df
Merge pull request #3512 from guoquanwu/revert_sr_reward
tomatoishealthy Nov 19, 2020
6a11f7b
reset transactionFeePool
sean-liu55 Nov 23, 2020
d23b229
add stakeTest
dpneko Nov 24, 2020
e41d7f9
remove unnecessary validate
Nov 25, 2020
3e4033a
add suicideTest, rewardBalanceTest
dpneko Nov 25, 2020
dd2c148
add Unstake and Trc10 tests
yanghang8612 Nov 26, 2020
6d183ba
Merge pull request #3521 from yanghang8612/feature/add_stake_tokenIss…
dpneko Nov 26, 2020
87154c6
add withdrawRewardTest and IsSRCandidateTest
dpneko Nov 26, 2020
e3ad7c5
fix sonar check
dpneko Nov 26, 2020
a1ba739
Merge pull request #3522 from tronprotocol/feature/add_stake_tokenIss…
Lredhdx Nov 27, 2020
552da40
Merge branch 'develop' into feature/sr_fee_model
sean-liu55 Dec 1, 2020
56819c6
change version info
sean-liu55 Dec 1, 2020
a73ab68
Merge pull request #3532 from tronprotocol/feature/sr_fee_model
renchenchang Dec 1, 2020
c59efdf
Remove legacy code of sr reward
tomatoishealthy Dec 2, 2020
cdab1e1
add 47th proposal MAX_FEE_LIMIT to change feelimit
Dec 2, 2020
6d14bf2
Merge pull request #3534 from tronprotocol/feature/change_maxfeelimit
dpneko Dec 2, 2020
b01fb50
Merge pull request #3535 from tronprotocol/feature/update_to_solidity…
dpneko Dec 2, 2020
bd14784
remove call contract function by data
Dec 3, 2020
3d1d1fe
Merge pull request #3537 from tronprotocol/rosetta-api-v4.1.1
Yrp Dec 3, 2020
aa18e6e
support account balance history lookup
Yrp Dec 3, 2020
b0e5021
Merge pull request #3536 from tronprotocol/feature/update_to_solidity…
Lredhdx Dec 4, 2020
3acfee0
add daily build transaction type number
mumianhua Dec 4, 2020
6567d02
Merge pull request #3533 from guoquanwu/revert_sr_reward_v2
Yrp Dec 4, 2020
9082317
support account balance history lookup
Yrp Dec 4, 2020
c8c37cf
support account balance history lookup
Yrp Dec 4, 2020
699ebf7
always output default value fields
Yrp Dec 6, 2020
b8d6036
always output default value fields
Yrp Dec 6, 2020
b40f2e1
fix conflict
Yrp Dec 6, 2020
f02e808
Merge pull request #3546 from tronprotocol/support_account_balance_me…
Yrp Dec 6, 2020
5d51270
always output default value fields
Yrp Dec 6, 2020
93e9488
clean up unused import
Yrp Dec 6, 2020
69c4a3c
fix sonar check
Yrp Dec 7, 2020
5c82a08
fix sonar check
Yrp Dec 7, 2020
809b5c9
Merge pull request #3538 from tronprotocol/support_account_balance
tomatoishealthy Dec 7, 2020
30147b7
fix unittest BlockMsgHandlerTest.testProcessMessage
Yrp Dec 8, 2020
0c04ba9
fix unittest BlockMsgHandlerTest.testProcessMessage
Yrp Dec 8, 2020
3c292ad
fix unittest BlockMsgHandlerTest.testProcessMessage
Yrp Dec 8, 2020
a455b1c
Merge pull request #3551 from tronprotocol/fix_unittest_BlockMsgHandl…
eodiandie Dec 8, 2020
cba707c
jitpack
Yrp Dec 8, 2020
bf4dd67
jitpack
Yrp Dec 8, 2020
1b6dcda
jitpack
Yrp Dec 8, 2020
bc97cff
jitpack
Yrp Dec 8, 2020
8be99d4
jitpack
Yrp Dec 8, 2020
1bf7096
change BLOCK_VERSION
sean-liu55 Dec 9, 2020
696a3cf
support changing allowMarketTransaction in config
sean-liu55 Dec 9, 2020
238eebe
Add daily build 4.1.2 case
pangpangfeng Dec 9, 2020
1632285
Merge pull request #3555 from tronprotocol/improve_dailyBuild_report
wangzichichi Dec 9, 2020
acadc19
Add get account balance test case
pangpangfeng Dec 9, 2020
8ca0e7d
Merge pull request #3557 from tronprotocol/fix_unittest_BlockMsgHandl…
Yrp Dec 9, 2020
c62d08a
Add getAccountBalance and getBlockBalance test case
pangpangfeng Dec 9, 2020
627e446
Merge branch 'release_4.1.2' into test/4.1.2_case
pangpangfeng Dec 9, 2020
af0937b
Merge pull request #3553 from tronprotocol/jitpack_4.1.2
eodiandie Dec 9, 2020
16cefef
Merge branch 'release_4.1.2' into test/4.1.2_case
pangpangfeng Dec 9, 2020
a9adf83
support changing allowMarketTransaction in config
sean-liu55 Dec 10, 2020
46f7b96
Merge pull request #3558 from tronprotocol/hotfix/v4.1.2
sean-liu55 Dec 10, 2020
221a367
Change test
pangpangfeng Dec 10, 2020
23090f6
Merge branch 'release_4.1.2' into test/4.1.2_case
pangpangfeng Dec 10, 2020
f506bf8
Modify test case
pangpangfeng Dec 11, 2020
87dd279
[bugfix] when Thread A add item to List,while Thread B browse it
Dec 14, 2020
cac8efe
remove unused code
Dec 14, 2020
85f96ea
code style refactor
Dec 14, 2020
b0bc7bc
Merge pull request #3561 from tronprotocol/bugfix_eventtrigger_concur…
eodiandie Dec 14, 2020
95d53ba
Modify the method of getting the address of black hole
sean-liu55 Dec 15, 2020
e601eff
Modify the method of adjusting Balance
sean-liu55 Dec 15, 2020
0071471
Merge branch 'hotfix/v_4.1.2' into hotfix/v4.1.2
sean-liu55 Dec 15, 2020
6a1dc30
Merge pull request #3564 from tronprotocol/hotfix/v4.1.2
sean-liu55 Dec 15, 2020
47f5d4c
fix solidityTrigger fork problem
Dec 15, 2020
8895188
Merge pull request #3565 from tronprotocol/bugfix_solidity_performanc…
eodiandie Dec 15, 2020
0d3e4e3
Merge branch 'release_4.1.2' into test/4.1.2_case
pangpangfeng Dec 16, 2020
10797b3
visible address encode58
Yrp Dec 16, 2020
2c29d8a
add 0.6.0 testcase
MiraculousWang Dec 17, 2020
547f73b
fix some sonar error
Dec 17, 2020
7cc9646
add switch to forbid sr to use db backup feature
Dec 17, 2020
e7e92e7
code style refator
Dec 17, 2020
71296fe
Merge pull request #3574 from tronprotocol/add_switch_to_forbid_sr_us…
eodiandie Dec 17, 2020
9b815b0
Merge pull request #3575 from tronprotocol/release_4.1.2
Yrp Dec 17, 2020
625e64f
Adapted solidity file to 0.6.0
MiraculousWang Dec 17, 2020
9025ed7
add test case for transaction fee pool(no.48 proposal)
mumianhua Dec 18, 2020
3a3b262
Merge remote-tracking branch 'origin/test/4.1.2_case' into test/4.1.2…
mumianhua Dec 18, 2020
a5eeec4
fix transaction fee case
mumianhua Dec 18, 2020
e337d09
Merge pull request #3571 from tronprotocol/support_visible
eodiandie Dec 18, 2020
aefa593
visible address encode58
Yrp Dec 18, 2020
1e401e3
Merge branch 'support_visible' of github.com:tronprotocol/java-tron i…
Yrp Dec 18, 2020
f28efde
Merge pull request #3579 from tronprotocol/support_visible
eodiandie Dec 18, 2020
a10941b
add solidity 0.6 test
lylllll Dec 18, 2020
843fcf0
modify tryCatch case
MiraculousWang Dec 18, 2020
1f282d6
Merge branch 'test/4.1.2_case' of https://github.com/tronprotocol/jav…
Dec 18, 2020
4d4739f
Merge branch 'release_4.1.2' into test/4.1.2_case
pangpangfeng Dec 21, 2020
5e31c8b
Improve daily build case pass rate
pangpangfeng Dec 21, 2020
b6466c4
change TestCase Address
MiraculousWang Dec 21, 2020
ed6bbbd
add test
Dec 21, 2020
ab8c90e
Merge branch 'test/4.1.2_case' of https://github.com/tronprotocol/jav…
Dec 21, 2020
ea09235
fix solidityLogTrigger test case
mumianhua Dec 21, 2020
a7b670c
Merge remote-tracking branch 'origin/test/4.1.2_case' into test/4.1.2…
mumianhua Dec 21, 2020
e7ac2c9
checkStyle
MiraculousWang Dec 21, 2020
f78ccbf
resolve conflict
MiraculousWang Dec 21, 2020
76f99ea
Add abstract、override、virtual testcase
Dec 21, 2020
b9ef6bf
Merge pull request #3589 from tronprotocol/test/4.1.2_case
wangqqqqq Dec 22, 2020
61aa83c
ignore a unstable test for withdraw reward
dpneko Dec 22, 2020
7082769
fix sonar
dpneko Dec 22, 2020
52c4786
Change testng.conf
Dec 22, 2020
2eb8a12
Merge pull request #3590 from tronprotocol/feature/add_stake_tokenIss…
dpneko Dec 22, 2020
6e6468e
add
Dec 22, 2020
2104f4f
Adapt checkstyle
pangpangfeng Dec 22, 2020
71684e2
Merge branch 'release_4.1.2' into test/4.1.2_case
pangpangfeng Dec 22, 2020
8b3bf0e
Merge pull request #3592 from tronprotocol/test/4.1.2_case
MiraculousWang Dec 22, 2020
a7b60d6
Add getAccountBalance and getBlockBalance rpc test case
pangpangfeng Dec 25, 2020
2b1d7f3
Add getAccountBalance and getBlockBalance rpc test case
pangpangfeng Dec 25, 2020
8993f1f
scanBlock
MiraculousWang Dec 25, 2020
6932d5c
checkStyle
MiraculousWang Dec 25, 2020
f605fed
Merge pull request #3597 from tronprotocol/test/4.1.2_case
wangzichichi Dec 25, 2020
e59f64b
Optimize contract log test case
pangpangfeng Dec 30, 2020
263892c
Merge pull request #3603 from tronprotocol/test/4.1.2_case
wangzichichi Dec 30, 2020
25c9ccd
remove the blackhole account
lvs007 Jan 5, 2021
ca7af19
send fee to transaction fee pool
sean-liu55 Jan 6, 2021
473d2a0
add TransactionFeeAmount
sean-liu55 Jan 6, 2021
8d22cbf
add MarketAsset MutiSign testcase
MiraculousWang Jan 6, 2021
024bbb3
rename
MiraculousWang Jan 6, 2021
5b6969e
Revert "add TransactionFeeAmount"
sean-liu55 Jan 6, 2021
395582f
Merge pull request #3607 from tronprotocol/test/4.1.2_case
MiraculousWang Jan 6, 2021
c2ae51b
add punishment into TransactionInfo
sean-liu55 Jan 7, 2021
d1ee0fc
add supportPunishmentAmount() method
sean-liu55 Jan 7, 2021
074b755
rm addTransactionFeeAmount() method
sean-liu55 Jan 7, 2021
a130cec
stroge code
lvs007 Jan 7, 2021
fdaaf70
sh to bash
Yrp Jan 7, 2021
fb78d0d
Merge pull request #3609 from tronprotocol/sh_2_bash
eodiandie Jan 7, 2021
bb7881b
rename the field
lvs007 Jan 7, 2021
aee58a8
Merge pull request #3608 from tronprotocol/remove-blackhole-account
lvs007 Jan 7, 2021
a6b00a7
Daily build adapt proposal 49
pangpangfeng Jan 8, 2021
d587779
Merge pull request #3611 from tronprotocol/test/4.1.2_case
MiraculousWang Jan 8, 2021
d76c29f
add packing fee
sean-liu55 Jan 9, 2021
d9989a8
Merge branch 'release_4.1.2' of https://github.com/tronprotocol/java-…
pangpangfeng Jan 11, 2021
5a99de4
Stest case adapt proposal 49 latest modify
pangpangfeng Jan 11, 2021
e876938
rm creating account fee from packingFee
sean-liu55 Jan 11, 2021
d069e7a
Merge remote-tracking branch 'origin/remove-blackhole-account' into r…
sean-liu55 Jan 11, 2021
3282df0
Add create token fee not to sr test case
pangpangfeng Jan 12, 2021
2d4a7f9
Merge pull request #3613 from tronprotocol/remove-blackhole-account
sean-liu55 Jan 12, 2021
b716042
add the query burn trx interface
lvs007 Jan 13, 2021
6bf2ebb
modify the interface name
lvs007 Jan 13, 2021
f09bedb
Merge pull request #3615 from tronprotocol/remove-blackhole-account
lvs007 Jan 13, 2021
32a9dbe
Add burntrx api test case
pangpangfeng Jan 13, 2021
b8d702c
add the solidity and pbft interafce
lvs007 Jan 13, 2021
08e8544
name fix
forfreeday Jan 13, 2021
95b07b4
Merge pull request #3618 from forfreeday/feature/namefix
eodiandie Jan 13, 2021
a82e4b0
fix conflict
lvs007 Jan 13, 2021
9651b62
Merge pull request #3617 from tronprotocol/remove-blackhole-account
lvs007 Jan 14, 2021
96e3cb0
Add getburntrx api test case
pangpangfeng Jan 14, 2021
706e81b
Merge pull request #3616 from tronprotocol/test/4.1.2_case
wangzichichi Jan 14, 2021
4e56a1a
Add getburntrx api test case
pangpangfeng Jan 15, 2021
e763c15
Merge pull request #3619 from tronprotocol/test/4.1.2_case
wangzichichi Jan 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions Tron protobuf protocol document.md
Original file line number Diff line number Diff line change
Expand Up @@ -1537,6 +1537,7 @@ message `SmartContract` has mutiple attributes and nested message `ABI`
Function = 2;
Event = 3;
Fallback = 4;
Receive = 5;
}
```

Expand Down Expand Up @@ -1617,6 +1618,7 @@ message `SmartContract` has mutiple attributes and nested message `ABI`
Function = 2;
Event = 3;
Fallback = 4;
Receive = 5;
}
message Param {
bool indexed = 1;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ public boolean execute(Object object) throws ContractExeException {
accountStore.put(ownerAddress, account);

Commons.adjustBalance(accountStore, ownerAddress, -fee);
Commons.adjustBalance(accountStore, accountStore.getBlackhole().createDbKey(), fee);
if (chainBaseManager.getDynamicPropertiesStore().supportBlackHoleOptimization()) {
chainBaseManager.getDynamicPropertiesStore().burnTrx(fee);
} else {
Commons.adjustBalance(accountStore, accountStore.getBlackhole(), fee);
}

result.setStatus(fee, code.SUCESS);
} catch (BalanceInsufficientException | InvalidProtocolBufferException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,11 @@ public boolean execute(Object result) throws ContractExeException {
}

Commons.adjustBalance(accountStore, ownerAddress, -fee);
Commons.adjustBalance(accountStore, accountStore.getBlackhole().getAddress().toByteArray(),
fee);//send to blackhole

if (dynamicStore.supportBlackHoleOptimization()) {
dynamicStore.burnTrx(fee);
} else {
Commons.adjustBalance(accountStore, accountStore.getBlackhole(), fee);//send to blackhole
}
AccountCapsule accountCapsule = accountStore.get(ownerAddress);
List<FrozenSupply> frozenSupplyList = assetIssueContract.getFrozenSupplyList();
Iterator<FrozenSupply> iterator = frozenSupplyList.iterator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
import org.tron.protos.Protocol.Transaction.Result.code;
import org.tron.protos.contract.SmartContractOuterClass.ClearABIContract;

import static org.tron.core.actuator.ActuatorConstant.NOT_EXIST_STR;

@Slf4j(topic = "actuator")
public class ClearABIContractActuator extends AbstractActuator {

Expand Down Expand Up @@ -90,7 +92,7 @@ public boolean validate() throws ContractValidateException {
if (accountCapsule == null) {
throw new ContractValidateException(
ActuatorConstant.ACCOUNT_EXCEPTION_STR
+ readableOwnerAddress + "] not exists");
+ readableOwnerAddress + NOT_EXIST_STR);
}

byte[] contractAddress = contract.getContractAddress().toByteArray();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.tron.core.actuator;

import static org.tron.core.actuator.ActuatorConstant.NOT_EXIST_STR;

import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
import java.util.Objects;
Expand Down Expand Up @@ -49,8 +51,11 @@ public boolean execute(Object result)
Commons
.adjustBalance(accountStore, accountCreateContract.getOwnerAddress().toByteArray(), -fee);
// Add to blackhole address
Commons.adjustBalance(accountStore, accountStore.getBlackhole().createDbKey(), fee);

if (dynamicStore.supportBlackHoleOptimization()) {
dynamicStore.burnTrx(fee);
} else {
Commons.adjustBalance(accountStore, accountStore.getBlackhole(), fee);
}
ret.setStatus(fee, code.SUCESS);
} catch (BalanceInsufficientException | InvalidProtocolBufferException e) {
logger.debug(e.getMessage(), e);
Expand Down Expand Up @@ -95,7 +100,7 @@ public boolean validate() throws ContractValidateException {
String readableOwnerAddress = StringUtil.createReadableString(ownerAddress);
throw new ContractValidateException(
ActuatorConstant.ACCOUNT_EXCEPTION_STR
+ readableOwnerAddress + "] not exists");
+ readableOwnerAddress + NOT_EXIST_STR);
}

final long fee = calcFee();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.tron.core.actuator;

import static org.tron.core.actuator.ActuatorConstant.NOT_EXIST_STR;
import static org.tron.core.capsule.utils.TransactionUtil.isNumber;
import static org.tron.core.config.Parameter.ChainSymbol.TRX_SYMBOL_BYTES;

Expand All @@ -22,7 +23,6 @@
import org.tron.core.store.DynamicPropertiesStore;
import org.tron.core.store.ExchangeStore;
import org.tron.core.store.ExchangeV2Store;
import org.tron.core.utils.TransactionUtil;
import org.tron.protos.Protocol.Transaction.Contract.ContractType;
import org.tron.protos.Protocol.Transaction.Result.code;
import org.tron.protos.contract.ExchangeContract.ExchangeCreateContract;
Expand Down Expand Up @@ -118,9 +118,11 @@ public boolean execute(Object object) throws ContractExeException {

accountStore.put(accountCapsule.createDbKey(), accountCapsule);
dynamicStore.saveLatestExchangeNum(id);

Commons.adjustBalance(accountStore, accountStore.getBlackhole().createDbKey(), fee);

if (dynamicStore.supportBlackHoleOptimization()) {
dynamicStore.burnTrx(fee);
} else {
Commons.adjustBalance(accountStore, accountStore.getBlackhole(), fee);
}
ret.setExchangeId(id);
ret.setStatus(fee, code.SUCESS);
} catch (BalanceInsufficientException | InvalidProtocolBufferException e) {
Expand Down Expand Up @@ -161,7 +163,7 @@ public boolean validate() throws ContractValidateException {
}

if (!accountStore.has(ownerAddress)) {
throw new ContractValidateException("account[" + readableOwnerAddress + "] not exists");
throw new ContractValidateException("account[" + readableOwnerAddress + NOT_EXIST_STR);
}

AccountCapsule accountCapsule = accountStore.get(ownerAddress);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.tron.core.actuator;

import static org.tron.core.actuator.ActuatorConstant.NOT_EXIST_STR;
import static org.tron.core.capsule.utils.TransactionUtil.isNumber;
import static org.tron.core.config.Parameter.ChainSymbol.TRX_SYMBOL_BYTES;

Expand Down Expand Up @@ -137,7 +138,7 @@ public boolean validate() throws ContractValidateException {
}

if (!accountStore.has(ownerAddress)) {
throw new ContractValidateException("account[" + readableOwnerAddress + "] not exists");
throw new ContractValidateException("account[" + readableOwnerAddress + NOT_EXIST_STR);
}

AccountCapsule accountCapsule = accountStore.get(ownerAddress);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.tron.core.actuator;

import static org.tron.core.actuator.ActuatorConstant.NOT_EXIST_STR;
import static org.tron.core.config.Parameter.ChainConstant.FROZEN_PERIOD;
import static org.tron.core.config.Parameter.ChainConstant.TRX_PRECISION;

Expand Down Expand Up @@ -142,7 +143,7 @@ public boolean validate() throws ContractValidateException {
if (accountCapsule == null) {
String readableOwnerAddress = StringUtil.createReadableString(ownerAddress);
throw new ContractValidateException(
ActuatorConstant.ACCOUNT_EXCEPTION_STR + readableOwnerAddress + "] not exists");
ActuatorConstant.ACCOUNT_EXCEPTION_STR + readableOwnerAddress + NOT_EXIST_STR);
}

long frozenBalance = freezeBalanceContract.getFrozenBalance();
Expand Down Expand Up @@ -207,7 +208,7 @@ public boolean validate() throws ContractValidateException {
String readableOwnerAddress = StringUtil.createReadableString(receiverAddress);
throw new ContractValidateException(
ActuatorConstant.ACCOUNT_EXCEPTION_STR
+ readableOwnerAddress + "] not exists");
+ readableOwnerAddress + NOT_EXIST_STR);
}

if (dynamicStore.getAllowTvmConstantinople() == 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@

package org.tron.core.actuator;

import static org.tron.core.actuator.ActuatorConstant.CONTRACT_NOT_EXIST;
import static org.tron.core.actuator.ActuatorConstant.STORE_NOT_EXIST;
import static org.tron.core.actuator.ActuatorConstant.TX_RESULT_NULL;

import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
import java.util.Objects;
Expand Down Expand Up @@ -77,7 +81,7 @@ public boolean execute(Object object) throws ContractExeException {

TransactionResultCapsule ret = (TransactionResultCapsule) object;
if (Objects.isNull(ret)) {
throw new RuntimeException("TransactionResultCapsule is null");
throw new RuntimeException(TX_RESULT_NULL);
}
long fee = calcFee();

Expand All @@ -93,10 +97,14 @@ public boolean execute(Object object) throws ContractExeException {

// fee
accountCapsule.setBalance(accountCapsule.getBalance() - fee);
Commons.adjustBalance(accountStore, accountStore.getBlackhole().createDbKey(), fee);

if (dynamicStore.supportBlackHoleOptimization()) {
dynamicStore.burnTrx(fee);
} else {
Commons.adjustBalance(accountStore, accountStore.getBlackhole(), fee);
}
// 1. return balance and token
MarketUtils.returnSellTokenRemain(orderCapsule, accountCapsule, dynamicStore, assetIssueStore);
MarketUtils
.returnSellTokenRemain(orderCapsule, accountCapsule, dynamicStore, assetIssueStore);

MarketUtils.updateOrderState(orderCapsule, State.CANCELED, marketAccountStore);
accountStore.put(orderCapsule.getOwnerAddress().toByteArray(), accountCapsule);
Expand Down Expand Up @@ -145,10 +153,10 @@ public boolean execute(Object object) throws ContractExeException {
@Override
public boolean validate() throws ContractValidateException {
if (this.any == null) {
throw new ContractValidateException("No contract!");
throw new ContractValidateException(CONTRACT_NOT_EXIST);
}
if (chainBaseManager == null) {
throw new ContractValidateException("No account store or dynamic store!");
throw new ContractValidateException(STORE_NOT_EXIST);
}

initStores();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@

package org.tron.core.actuator;

import static org.tron.core.actuator.ActuatorConstant.CONTRACT_NOT_EXIST;
import static org.tron.core.actuator.ActuatorConstant.STORE_NOT_EXIST;
import static org.tron.core.actuator.ActuatorConstant.TX_RESULT_NULL;
import static org.tron.core.capsule.utils.TransactionUtil.isNumber;

import com.google.protobuf.ByteString;
Expand Down Expand Up @@ -46,7 +49,6 @@
import org.tron.core.store.MarketOrderStore;
import org.tron.core.store.MarketPairPriceToOrderStore;
import org.tron.core.store.MarketPairToPriceStore;
import org.tron.core.utils.TransactionUtil;
import org.tron.protos.Protocol.MarketOrder.State;
import org.tron.protos.Protocol.MarketOrderDetail;
import org.tron.protos.Protocol.MarketPrice;
Expand Down Expand Up @@ -101,7 +103,7 @@ public boolean execute(Object object) throws ContractExeException {

TransactionResultCapsule ret = (TransactionResultCapsule) object;
if (Objects.isNull(ret)) {
throw new RuntimeException("TransactionResultCapsule is null");
throw new RuntimeException(TX_RESULT_NULL);
}

long fee = calcFee();
Expand All @@ -124,8 +126,11 @@ public boolean execute(Object object) throws ContractExeException {
// fee
accountCapsule.setBalance(accountCapsule.getBalance() - fee);
// add to blackhole address
Commons.adjustBalance(accountStore, accountStore.getBlackhole().createDbKey(), fee);

if (dynamicStore.supportBlackHoleOptimization()) {
dynamicStore.burnTrx(fee);
} else {
Commons.adjustBalance(accountStore, accountStore.getBlackhole(), fee);
}
// 1. transfer of balance
transferBalanceOrToken(accountCapsule);

Expand Down Expand Up @@ -160,10 +165,10 @@ public boolean execute(Object object) throws ContractExeException {
@Override
public boolean validate() throws ContractValidateException {
if (this.any == null) {
throw new ContractValidateException("No contract!");
throw new ContractValidateException(CONTRACT_NOT_EXIST);
}
if (chainBaseManager == null) {
throw new ContractValidateException("No account store or dynamic store!");
throw new ContractValidateException(STORE_NOT_EXIST);
}

initStores();
Expand Down Expand Up @@ -288,7 +293,7 @@ public long calcFee() {

/**
* return marketPrice if matched, otherwise null
* */
*/
private MarketPrice hasMatch(List<byte[]> priceKeysList, MarketPrice takerPrice) {
if (priceKeysList.isEmpty()) {
return null;
Expand All @@ -310,7 +315,6 @@ private void matchOrder(MarketOrderCapsule takerCapsule, MarketPrice takerPrice,

// makerPair not exists
long makerPriceNumber = pairToPriceStore.getPriceNum(makerPair);

if (makerPriceNumber == 0) {
return;
}
Expand All @@ -319,7 +323,7 @@ private void matchOrder(MarketOrderCapsule takerCapsule, MarketPrice takerPrice,
// get maker price list
List<byte[]> priceKeysList = pairPriceToOrderStore
.getPriceKeysList(MarketUtils.getPairPriceHeadKey(makerSellTokenID, makerBuyTokenID),
(long)(MAX_MATCH_NUM + 1), makerPriceNumber, true);
(long) (MAX_MATCH_NUM + 1), makerPriceNumber, true);

int matchOrderCount = 0;
// match different price
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public boolean execute(Object result)
executeTransparentFrom(shieldedTransferContract.getTransparentFromAddress().toByteArray(),
shieldedTransferContract.getFromAmount(), ret, fee);
}
Commons.adjustAssetBalanceV2(accountStore.getBlackhole().createDbKey(),
Commons.adjustAssetBalanceV2(accountStore.getBlackhole(),
CommonParameter.getInstance().getZenTokenId(), fee,
accountStore, assetIssueStore, dynamicStore);
} catch (BalanceInsufficientException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,15 @@ public boolean execute(Object object) throws ContractExeException {

fee = fee + dynamicStore.getCreateNewAccountFeeInSystemContract();
}
Commons.adjustBalance(accountStore, ownerAddress, -fee);
Commons.adjustBalance(accountStore, accountStore.getBlackhole().createDbKey(), fee);
ret.setStatus(fee, code.SUCESS);
Commons.adjustBalance(accountStore, ownerAddress, -amount);

Commons.adjustBalance(accountStore, ownerAddress, -(Math.addExact(fee, amount)));
if (dynamicStore.supportBlackHoleOptimization()) {
dynamicStore.burnTrx(fee);
} else {
Commons.adjustBalance(accountStore, accountStore.getBlackhole(), fee);
}
Commons.adjustBalance(accountStore, toAddress, amount);
ret.setStatus(fee, code.SUCESS);
} catch (BalanceInsufficientException | ArithmeticException | InvalidProtocolBufferException e) {
logger.debug(e.getMessage(), e);
ret.setStatus(fee, code.FAILED);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@ public boolean execute(Object result) throws ContractExeException {
ByteString assetName = transferAssetContract.getAssetName();
long amount = transferAssetContract.getAmount();

Commons.adjustBalance(accountStore, ownerAddress, -fee);
Commons.adjustBalance(accountStore, accountStore.getBlackhole().createDbKey(), fee);

AccountCapsule ownerAccountCapsule = accountStore.get(ownerAddress);
if (!ownerAccountCapsule
.reduceAssetAmountV2(assetName.toByteArray(), amount, dynamicStore, assetIssueStore)) {
Expand All @@ -87,6 +84,12 @@ public boolean execute(Object result) throws ContractExeException {
.addAssetAmountV2(assetName.toByteArray(), amount, dynamicStore, assetIssueStore);
accountStore.put(toAddress, toAccountCapsule);

Commons.adjustBalance(accountStore, ownerAccountCapsule, -fee);
if (dynamicStore.supportBlackHoleOptimization()) {
dynamicStore.burnTrx(fee);
} else {
Commons.adjustBalance(accountStore, accountStore.getBlackhole(), fee);
}
ret.setStatus(fee, code.SUCESS);
} catch (BalanceInsufficientException e) {
logger.debug(e.getMessage(), e);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package org.tron.core.actuator;

import static org.tron.core.actuator.ActuatorConstant.ACCOUNT_EXCEPTION_STR;

import com.google.common.collect.Lists;
import com.google.protobuf.ByteString;
import com.google.protobuf.InvalidProtocolBufferException;
Expand Down Expand Up @@ -112,7 +114,7 @@ public boolean validate() throws ContractValidateException {
if (accountCapsule == null) {
String readableOwnerAddress = StringUtil.createReadableString(ownerAddress);
throw new ContractValidateException(
"Account[" + readableOwnerAddress + "] does not exist");
ACCOUNT_EXCEPTION_STR + readableOwnerAddress + "] does not exist");
}

if (accountCapsule.getFrozenSupplyCount() <= 0) {
Expand Down
Loading