Skip to content

Incorrect API response for get_block_header_state #215

@abhi3700

Description

@abhi3700

Description

While requesting for API response for block_header_state, I get this as response.

I think authority key should have an array of structs as understood from the documentation. That means 0 shouldn't be there which is the index of 1st element in the array.

But, later on was highlighted by @kevin on telegram group chat.

Thereby coming to an agreement, I propose these as one of the corrections that we can proceed with:

"active_schedule": {
    "version": 2085,
    "producers": [
      {
        "producer_name": "atticlabeosb",
        "authority": {
            "threshold": 1,
            "keys": [
              {
                "key": "EOS7PfA3A4UdfMu2wKbuXdbHn8EWAxbMnFoFWui4X2zsr2oPwdQJP",
                "weight": 1
              }
            ]
          }
      },
"active_schedule": {
    "version": 2085,
    "producers": {
      "0": {
        "producer_name": "atticlabeosb",
        "authority": {
            "threshold": 1,
            "keys": [
              {
                "key": "EOS7PfA3A4UdfMu2wKbuXdbHn8EWAxbMnFoFWui4X2zsr2oPwdQJP",
                "weight": 1
              }
            ]
          }
       }
      },
"active_schedule": {
    "version": 2085,
    "producers": [
      {
        "producer_name": "atticlabeosb",
        "authority": [
          {
            "threshold": 1,
            "keys": [
              {
                "key": "EOS7PfA3A4UdfMu2wKbuXdbHn8EWAxbMnFoFWui4X2zsr2oPwdQJP",
                "weight": 1
              }
            ]
          }
        ]
      },

Or else, I have thought of creating a way out to define a vector with elements of different data types (in Rust that I know of) using vector of enums.

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