fix miner suicide problem, GST +2

This commit is contained in:
andri lim 2019-03-18 20:29:07 +07:00
parent 655c6bcaae
commit f518de20fc
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
3 changed files with 8 additions and 7 deletions

View File

@ -2076,14 +2076,14 @@ OK: 0/284 Fail: 0/284 Skip: 284/284
+ suicideCaller.json OK + suicideCaller.json OK
+ suicideCallerAddresTooBigLeft.json OK + suicideCallerAddresTooBigLeft.json OK
+ suicideCallerAddresTooBigRight.json OK + suicideCallerAddresTooBigRight.json OK
suicideCoinbase.json Skip + suicideCoinbase.json OK
+ suicideNotExistingAccount.json OK + suicideNotExistingAccount.json OK
+ suicideOrigin.json OK + suicideOrigin.json OK
+ suicideSendEtherPostDeath.json OK + suicideSendEtherPostDeath.json OK
+ suicideSendEtherToMe.json OK + suicideSendEtherToMe.json OK
+ testRandomTest.json OK + testRandomTest.json OK
``` ```
OK: 56/67 Fail: 0/67 Skip: 11/67 OK: 57/67 Fail: 0/67 Skip: 10/67
## stTransactionTest ## stTransactionTest
```diff ```diff
+ ContractStoreClearsOOG.json OK + ContractStoreClearsOOG.json OK
@ -2114,7 +2114,7 @@ OK: 56/67 Fail: 0/67 Skip: 11/67
+ SuicidesAndInternlCallSuicidesOOG.json OK + SuicidesAndInternlCallSuicidesOOG.json OK
+ SuicidesAndInternlCallSuicidesSuccess.json OK + SuicidesAndInternlCallSuicidesSuccess.json OK
+ SuicidesAndSendMoneyToItselfEtherDestroyed.json OK + SuicidesAndSendMoneyToItselfEtherDestroyed.json OK
SuicidesMixingCoinbase.json Skip + SuicidesMixingCoinbase.json OK
+ SuicidesStopAfterSuicide.json OK + SuicidesStopAfterSuicide.json OK
+ TransactionDataCosts652.json OK + TransactionDataCosts652.json OK
+ TransactionFromCoinbaseHittingBlockGasLimit.json OK + TransactionFromCoinbaseHittingBlockGasLimit.json OK
@ -2131,7 +2131,7 @@ OK: 56/67 Fail: 0/67 Skip: 11/67
+ UserTransactionZeroCost.json OK + UserTransactionZeroCost.json OK
+ UserTransactionZeroCostWithData.json OK + UserTransactionZeroCostWithData.json OK
``` ```
OK: 43/44 Fail: 0/44 Skip: 1/44 OK: 44/44 Fail: 0/44 Skip: 0/44
## stTransitionTest ## stTransitionTest
```diff ```diff
+ createNameRegistratorPerTxsAfter.json OK + createNameRegistratorPerTxsAfter.json OK
@ -2520,4 +2520,4 @@ OK: 0/133 Fail: 0/133 Skip: 133/133
OK: 0/130 Fail: 0/130 Skip: 130/130 OK: 0/130 Fail: 0/130 Skip: 130/130
---TOTAL--- ---TOTAL---
OK: 1428/2334 Fail: 0/2334 Skip: 906/2334 OK: 1430/2334 Fail: 0/2334 Skip: 904/2334

View File

@ -61,6 +61,9 @@ proc processTransaction*(tx: Transaction, sender: EthAddress, vmState: BaseVMSta
else: else:
snapshot.commit() snapshot.commit()
if computation.isSuicided(vmState.blockHeader.coinbase):
return 0
type type
# TODO: these types need to be removed # TODO: these types need to be removed
# once eth/bloom and eth/common sync'ed # once eth/bloom and eth/common sync'ed

View File

@ -16,8 +16,6 @@ func allowedFailingGeneralStateTest*(folder, name: string): bool =
"randomStatetest14.json", "randomStatetest14.json",
"randomStatetest85.json", "randomStatetest85.json",
"tx_e1c174e2.json", "tx_e1c174e2.json",
"suicideCoinbase.json",
"SuicidesMixingCoinbase.json",
# 2019-02-15: # 2019-02-15:
"randomStatetest101.json", "randomStatetest101.json",
"randomStatetest7.json", "randomStatetest7.json",