Skip to content

CBlockHeader.deserialize: Not all bytes consumed during deserialization #3

@muarvyn

Description

@muarvyn

The function Proxy.getblockheader throws an exception for blocks with height >= 1219736.The log:

python3 -c \
'from ravencoin.rpc import Proxy
prox = Proxy("http://testuser:[email protected]:8766")
blkhash = prox.getblockhash(1219736)
blkhdr = prox.getblockheader(blkhash)
print(blkhdr)
'
Traceback (most recent call last):
  File "<string>", line 4, in <module>
  File "/home/vlad/.local/lib/python3.8/site-packages/ravencoin/rpc.py", line 506, in getblockheader
    return CBlockHeader.deserialize(unhexlify(r))
  File "/home/vlad/.local/lib/python3.8/site-packages/ravencoin/core/serialize.py", line 127, in deserialize

Environment: Python 3.8.5; Ubuntu 20.04 LTS; Raven Core Daemon version v4.3.2.1-9def8ed6b

The log for block #1219735:

$ python3 -c 'from ravencoin.rpc import Proxy
prox = Proxy("http://testuser:[email protected]:8766")
blkhash = prox.getblockhash(1219735)
blkhdr = prox.getblockheader(blkhash)
print(blkhdr)
'
CBlockHeader(805306368, lx(0000000000000246ee4eab0e94b0bd5e30ffd09ffaca35ddd3b0582502a2fb6d), lx(e7c8a07b5edb7ba7a593ae49628ddd60b6b431abee0c801881861df2105bef80), 1588787973, 0x1a252b77, 0x6f20d01d)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions