-
Couldn't load subscription status.
- Fork 454
Description
There are multiple GraphQL hive tests where due to historical reasons 2 responses are accepted. This is unfortunate. The aim of this issue to discuss and agree on one output. The following tests have 2 acceptable responses:
17_eth_getBlock_byNumberInvalid.jsontries to get a block by a number that doesn't exist in the chain (88888888)07_eth_gasPrice.jsonaccepts both0x10and0x1as valid responses30_eth_getTransaction_byHash.jsonthis returns a transaction object. it accepts 2 responses. As far as I can tell these are the differences:indexbeing0vs0x0. We should use0x0here now that all integer values are hex-encodedlog.indexbeing0vs0x0. Same as above.statusbeingnullvs0x0. I'm not sure why status should be null here. IMO we should return0x0.
33_eth_getTransactionReceipt.jsonas far as I can tell only difference isindexbeing0vs0x0. Should use0x0.
The following testcase also accepts 2 responses. Either an error, or simply a nil value. It gets the balance of an account against a block which shouldnt exist. However since we've added new block the query has now actually a correct response. It needs to be updated with another block number.
12_eth_getBalance_toobig_bn.json
We need to agree what to do for 12 and 17. It boils down to this: when a resource does not exist, return null or error. IMO to stay consistent with JSON-RPC we should return null. Also this is not really an exception.
Not sure what to do for 07_eth_gasPrice.