Skip to content

Epoch entity endBlock overlaps startBlock of next epoch #106

@abarmat

Description

@abarmat

Issue

Epoch endBlock should be one block before startBlock of next Epoch to avoid overlapping.

Solution

This can be fixed by calculating endBlock = startBlock + epochLength - 1

Current Behaviour

By querying the endpoint https://gateway.testnet.thegraph.com/network you get these results.

Query

query MyQuery {
  epoches(orderBy:"startBlock", orderDirection: "desc") {
    id
    endBlock
    startBlock
  }
}

Result

{
  "data": {
    "epoches": [
      {
        "endBlock": 8366425,
        "id": "719",
        "startBlock": 8366148
      },
      {
        "endBlock": 8366148,
        "id": "718",
        "startBlock": 8365871
      },
}

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