graph-network-subgraph icon indicating copy to clipboard operation
graph-network-subgraph copied to clipboard

Remove unused comparison for old and new end block

Open abarmat opened this issue 3 years ago • 0 comments

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()
  }

abarmat avatar Apr 08 '21 20:04 abarmat