From ea15cacd24f75c2d888784846a85a89829218dcf Mon Sep 17 00:00:00 2001 From: Nick Johnson Date: Wed, 5 Oct 2016 09:46:05 +0100 Subject: [PATCH] tests: Add consensus test for OOG of a prefunded contract creation --- tests/files/StateTests/stInitCodeTest.json | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/tests/files/StateTests/stInitCodeTest.json b/tests/files/StateTests/stInitCodeTest.json index c30e0462ea..ce26101e16 100755 --- a/tests/files/StateTests/stInitCodeTest.json +++ b/tests/files/StateTests/stInitCodeTest.json @@ -1104,5 +1104,67 @@ "to" : "", "value" : "0x01" } + }, + "OutOfGasPrefundedContractCreation" : { + "env" : { + "currentCoinbase" : "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba", + "currentDifficulty" : "0x02b8feb0", + "currentGasLimit" : "0x05f5e100", + "currentNumber" : "0x00", + "currentTimestamp" : "0x01", + "previousHash" : "5e20a0453cecd065ea59c37ac63e079ee08998b6045136a8ce6635c7912ec0b6" + }, + "logs" : [ + ], + "out" : "0x", + "post" : { + "2adc25665018aa1fe0e6bc666dac8fc2697ff9ba" : { + "balance" : "0x0278d0", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x0cc970", + "code" : "0x", + "nonce" : "0x01", + "storage" : { + } + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "0x1", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "postStateRoot" : "cbc258a15bcc22ec1c8d9e63b82159dd1caf8f3527d8215bdd9168e39d0c89e2", + "pre" : { + "a94f5374fce5edbc8e2a8697c15331677e6ebf0b" : { + "balance" : "0x0f4240", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + }, + "6295ee1b4f6dd65047762f924ecd367c17eabf8f" : { + "balance" : "0x1", + "code" : "0x", + "nonce" : "0x00", + "storage" : { + } + } + }, + "transaction" : { + "data" : "0x600a80600c6000396000f200600160008035811a8100", + "gasLimit" : "0xd2f0", + "gasPrice" : "0x03", + "nonce" : "0x00", + "secretKey" : "45a915e4d060149eb4365960e6a7a45f334393093061116b197e3240065ff2d8", + "to" : "", + "value" : "0x01" + } } } \ No newline at end of file