Badger-Finance / badger-rewards

MIT License
3 stars 3 forks source link

fix: fixing timebomb miscalc for contributor months accrued #1005

Closed SHAKOTN closed 1 year ago

SHAKOTN commented 1 year ago

Done: Calculate COUNCILOR_MONTHS_ACCRUED constant properly

"0xD798428e860465E08B522f8440f707593E6d22C6": NOW.month - datetime.datetime(2022, 7, 1).month

This is a timebomb left in code. When 2023 came, this equation turned into negative numbers which lead to boost bot failure

Fixes #1004

codecov[bot] commented 1 year ago

Codecov Report

Merging #1005 (836f4c2) into development (10695ad) will not change coverage. The diff coverage is 100.00%.

@@             Coverage Diff              @@
##           development    #1005   +/-   ##
============================================
  Coverage        82.75%   82.75%           
============================================
  Files               59       59           
  Lines             2737     2737           
============================================
  Hits              2265     2265           
  Misses             472      472           
Impacted Files Coverage Δ
config/constants/emissions.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.