Skip to content
This repository has been archived by the owner on Nov 15, 2021. It is now read-only.

error in json serialization of certain block #360

Closed
yanilkr opened this issue Mar 27, 2018 · 1 comment
Closed

error in json serialization of certain block #360

yanilkr opened this issue Mar 27, 2018 · 1 comment

Comments

@yanilkr
Copy link

yanilkr commented Mar 27, 2018

If you try to get block 1280715 with jsonrpc on neo.testnet you get this error.

{'jsonrpc': '2.0', 'id': 0, 'error': {'code': -32603, 'message': 'list index out of range'}}

The root cause of the problem is here

if self.Transactions[0] and isinstance(self.Transactions[0], str):

It should be

if len(self.Transactions) > 0 and isinstance(self.Transactions[0], str):

neoscan gets this block correctly
https://neoscan-testnet.io/block/fa36382ec3e52ca6d731449c37de77491a442fd8a21a59b46211ea3e61093cb3

@brianlenz
Copy link
Contributor

brianlenz commented Mar 27, 2018

I believe this is the same as #302 (or certainly the same error, anyway). The issue was that an invalid block was relayed. The fundamental issue is that there is a block with no transactions, as that shouldn't really occur. This was ultimately transferred to a neo core issue: neo-project/neo#193

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants