helium / blockchain-core

Apache License 2.0
213 stars 85 forks source link

Andymck/reactivation tweaks #1361

Open andymck opened 2 years ago

andymck commented 2 years ago

related sibyl pr: https://github.com/helium/sibyl/pull/53

  1. Centralises a couple of util functions ,is_gw_active/3 and max_activity_age rather than having this code living in various places.
  2. Check to see if a GW is asserted when processing the reactivation lists in a HB, if not then dont reactivate
  3. Check to see if a GW has already been reactivated when processing the reactivation list in a HB, for example a GW could have been bouncing around validators and been included in the HB from multiple validators. We now check to if it is within the max activity age and if so then dont update its last activity field

TODO: Point 3 of this list may require a chain var ?