fix create hash collision, GST +1

This commit is contained in:
andri lim 2019-03-16 12:13:57 +07:00
parent 3844bc9a11
commit adb1286e28
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
3 changed files with 6 additions and 5 deletions

View File

@ -2044,7 +2044,7 @@ OK: 0/284 Fail: 0/284 Skip: 284/284
+ CallToReturn1ForDynamicJump0.json OK
+ CallToReturn1ForDynamicJump1.json OK
+ CalltoReturn2.json OK
CreateHashCollision.json Skip
+ CreateHashCollision.json OK
+ PostToReturn1.json OK
+ TestNameRegistrator.json OK
+ balanceInputAddressTooBig.json OK
@ -2083,7 +2083,7 @@ OK: 0/284 Fail: 0/284 Skip: 284/284
+ suicideSendEtherToMe.json OK
+ testRandomTest.json OK
```
OK: 52/67 Fail: 0/67 Skip: 15/67
OK: 53/67 Fail: 0/67 Skip: 14/67
## stTransactionTest
```diff
+ ContractStoreClearsOOG.json OK
@ -2520,4 +2520,4 @@ OK: 0/133 Fail: 0/133 Skip: 133/133
OK: 0/130 Fail: 0/130 Skip: 130/130
---TOTAL---
OK: 1229/2334 Fail: 0/2334 Skip: 1105/2334
OK: 1230/2334 Fail: 0/2334 Skip: 1104/2334

View File

@ -560,7 +560,7 @@ proc setupCreate(computation: var BaseComputation, memPos, len: int, value: Uint
if isCollision:
debug "Address collision while creating contract", address = contractAddress.toHex
push: 0
raise newException(ValidationError, "Contract creation failed, address already in use")
return
let childMsg = prepareChildMessage(
computation,
@ -585,6 +585,8 @@ op create, inline = false, value, startPosition, size:
return
var childComp = setupCreate(computation, memPos, len, value)
if childComp.isNil: return
computation.applyChildComputation(childComp, Create)
if childComp.isError:

View File

@ -63,7 +63,6 @@ func allowedFailingGeneralStateTest*(folder, name: string): bool =
"RevertOpcodeReturn.json",
"RevertOpcodeWithBigOutputInInit.json",
"tx_e1c174e2.json",
"CreateHashCollision.json",
"suicideCoinbase.json",
"Opcodes_TransactionInit.json",
"SuicidesMixingCoinbase.json",