|
30 | 30 | import org.tron.core.vm.JumpTable; |
31 | 31 | import org.tron.core.vm.Op; |
32 | 32 | import org.tron.core.vm.Operation; |
| 33 | +import org.tron.core.vm.OperationActions; |
33 | 34 | import org.tron.core.vm.OperationRegistry; |
34 | 35 | import org.tron.core.vm.VM; |
35 | | -import org.tron.core.vm.OperationActions; |
36 | 36 | import org.tron.core.vm.config.ConfigLoader; |
37 | 37 | import org.tron.core.vm.config.VMConfig; |
38 | 38 | import org.tron.core.vm.program.Program; |
@@ -895,9 +895,9 @@ public void testSuicideCost() throws ContractValidateException { |
895 | 895 |
|
896 | 896 | byte[] receiver3 = generateRandomAddress(); |
897 | 897 | program.stackPush(new DataWord(receiver3)); |
898 | | - Assert.assertEquals(30000, EnergyCost.getSuicideCost2(program)); |
| 898 | + Assert.assertEquals(30000, EnergyCost.getSuicideCost3(program)); |
899 | 899 | invoke.getDeposit().createAccount(receiver3, Protocol.AccountType.Normal); |
900 | | - Assert.assertEquals(5000, EnergyCost.getSuicideCost2(program)); |
| 900 | + Assert.assertEquals(5000, EnergyCost.getSuicideCost3(program)); |
901 | 901 | } |
902 | 902 |
|
903 | 903 | @Test |
@@ -971,6 +971,8 @@ public void testSuicideAction2() throws ContractValidateException { |
971 | 971 | byte prePrefixByte = DecodeUtil.addressPreFixByte; |
972 | 972 | DecodeUtil.addressPreFixByte = Constant.ADD_PRE_FIX_BYTE_MAINNET; |
973 | 973 |
|
| 974 | + program.stackPush(new DataWord( |
| 975 | + dbManager.getAccountStore().getBlackhole().getAddress().toByteArray())); |
974 | 976 | OperationActions.suicideAction2(program); |
975 | 977 |
|
976 | 978 | Assert.assertEquals(1, program.getResult().getDeleteAccounts().size()); |
|
0 commit comments