helium / blockchain-core

Apache License 2.0
213 stars 85 forks source link

ensure after filtering we have max active gws up to limit #1378

Closed andymck closed 2 years ago

andymck commented 2 years ago

This improves the filtering and limit application of h3dex targeting. The problem is that we were first limiting the pool of GWs in the hex to a max count equal to chain var poc_witness_consideration_limit and then filting any inactives out of those.

This could result in a final pool of GWs well below the max limit value, should any inactive GWs be included in the deterministic subset result when applying the limit.

Now in this scenario if after performing the subset and filtering should the count of GWs be less than the limit value we then add additional active GWs to the subset should they be available.

andymck commented 2 years ago

superseded by #1381