Skip to content
This repository was archived by the owner on Jul 29, 2022. It is now read-only.
This repository was archived by the owner on Jul 29, 2022. It is now read-only.

dot_chain_block_number: Parse block number as scale encoded integer #4

Description

@mxinden

As far as I can tell chain_getBlock returns the block height as a scale encoded integer. For all block number values within the range [0, 2^6) one can ignore the fact that it is SCALE encoded (given that it would be within the single byte mode) and can parse it as a HEX. Once one exceeds the before mentioned range one can not ignore the fact that it is scale encoded.

m.append({
'name': 'dot_chain_block_number',
'prop': { 'block': 'finalized' },
'value': int(chain_FinalizedHeadBlock['block']['header']['number'], 16)
})

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions