diff options
author | Dimitry <dimitry@ethereum.org> | 2018-11-20 02:28:33 +0800 |
---|---|---|
committer | Dimitry <dimitry@ethereum.org> | 2018-11-20 02:28:33 +0800 |
commit | e091b9be7a31d1985e685991c05ea3f9b548bddc (patch) | |
tree | 287faa33d20d47a163e0b8088540f48544da9598 /JSONSchema | |
parent | 03f578c27bf5a58ba8d88df4a01b5395470f7bfe (diff) | |
download | tangerine-tests-e091b9be7a31d1985e685991c05ea3f9b548bddc.tar tangerine-tests-e091b9be7a31d1985e685991c05ea3f9b548bddc.tar.gz tangerine-tests-e091b9be7a31d1985e685991c05ea3f9b548bddc.tar.bz2 tangerine-tests-e091b9be7a31d1985e685991c05ea3f9b548bddc.tar.lz tangerine-tests-e091b9be7a31d1985e685991c05ea3f9b548bddc.tar.xz tangerine-tests-e091b9be7a31d1985e685991c05ea3f9b548bddc.tar.zst tangerine-tests-e091b9be7a31d1985e685991c05ea3f9b548bddc.zip |
fix blockchain tests expect section json scheme checkconsttransition
more info when scheme check errors
Diffstat (limited to 'JSONSchema')
-rw-r--r-- | JSONSchema/bc-filler-schema.json | 24 | ||||
-rw-r--r-- | JSONSchema/definitions.json | 39 | ||||
-rw-r--r-- | JSONSchema/st-filler-schema.json | 14 |
3 files changed, 58 insertions, 19 deletions
diff --git a/JSONSchema/bc-filler-schema.json b/JSONSchema/bc-filler-schema.json index b002f43ae..a6874095a 100644 --- a/JSONSchema/bc-filler-schema.json +++ b/JSONSchema/bc-filler-schema.json @@ -1,5 +1,17 @@ { "definitions": { + "BlockchainExpectSection": { + "additionalProperties": false, + "properties": { + "network": { + "$ref": "#/definitions/Networks" + }, + "result": { + "$ref": "#/definitions/AccountMap" + } + }, + "type": "array" + }, "BadHexData": { "pattern": "^0x[0-9a-zA-Z]*$", "type": "string" @@ -317,12 +329,14 @@ "type": "string" }, "expect": { - "patternProperties": { - "^0x[0-9a-f]*": { - "$ref": "#/definitions/PreStateAccount", - "description": "poststate account address with 0x prefix" + "oneOf": [ + { + "$ref": "#/definitions/AccountMap" + }, + { + "$ref": "#/definitions/BlockchainExpectSection" } - } + ] }, "genesisBlockHeader": { "$ref": "#/definitions/BlockHeader" diff --git a/JSONSchema/definitions.json b/JSONSchema/definitions.json index 529e08763..1d5a9ad69 100644 --- a/JSONSchema/definitions.json +++ b/JSONSchema/definitions.json @@ -1,5 +1,44 @@ { "definitions": { + "AccountMap": { + "additionalProperties": false, + "patternProperties": { + "^0x[0-9a-fA-F]{40}": { + "$ref": "#/definitions/ExpectAccount", + "description": "filler prestate addresses with 0x prefix" + }, + "^[0-9a-fA-F]{40}": { + "$ref": "#/definitions/ExpectAccount", + "description": "filler prestate addresses without 0x prefix" + } + }, + "type": "object" + }, + "ExpectAccount": { + "additionalproperties": true, + "properties": { + "balance": { + "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" + }, + "code": { + "type": "string" + }, + "nonce": { + "$ref": "#/definitions/IntegerOrEmptyOrConfusedHex" + }, + "storage": { + "additionalProperties": false, + "patternProperties": { + "^0x[0-9a-f]+": { + "$ref": "#/definitions/PrefixedHexOrInteger", + "description": "storage key with 0x prefix, just the prefix `0x` is null and thus not permitted, a hex quantity is permitted. for the storage value, only hex data is permitted in filled test. Both decimal and hex allowed for the fillers." + } + }, + "type": "object" + } + }, + "type": "object" + }, "AddressMaybePrefixOrEmpty": { "oneOf": [ { diff --git a/JSONSchema/st-filler-schema.json b/JSONSchema/st-filler-schema.json index ed0e14e58..c533ad819 100644 --- a/JSONSchema/st-filler-schema.json +++ b/JSONSchema/st-filler-schema.json @@ -1,19 +1,5 @@ { "definitions": { - "AccountMap": { - "additionalProperties": false, - "patternProperties": { - "^0x[0-9a-fA-F]{40}": { - "$ref": "#/definitions/PreStateAccount", - "description": "filler prestate addresses with 0x prefix" - }, - "^[0-9a-fA-F]{40}": { - "$ref": "#/definitions/PreStateAccount", - "description": "filler prestate addresses without 0x prefix" - } - }, - "type": "object" - }, "NullSenderTransaction": { "properties": { "data": { |