graphprotocol / graphprotocol/graph-network-subgraph

Remove unused comparison for old and new end block

Open
#108 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
82
Forks
47
PR merge metrics
No merged PRs in 30d

Description

https://github.com/graphprotocol/graph-network-subgraph/pull/107#discussion_r609076614

- epoch start block = 1000
- epoch end block = 3000

then we halve the epoch length. so now it will be
  let newEndBlock = 1000 + 1000
  if (3000 != 2000) {
    epoch.endBlock = 2000
    epoch.save()
  }
  
but if we double the epoch length we get
  let newEndBlock = 1000 + 4000
  if (3000 != 5000) {
    epoch.endBlock = 5000
    epoch.save()
  }

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the code discussed in pull request #107, using discussion_r609076614 as the entry point. Locate the comparison between the old and new end blocks, then confirm that removing the unused comparison still leaves the demonstrated halving and doubling updates intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.