helium / blockchain-core

Apache License 2.0
213 stars 85 forks source link

assign challenger rewards to validators #1291

Closed jeffgrunewald closed 2 years ago

jeffgrunewald commented 2 years ago

under validator-led challenges, the poc_challengers reward type needs to be tagged as being for validators in order to be correctly handled within the map:fold that assigns rewards to accounts. this will require a chain reset.

a messier alternative, but would be slightly more backward compatible could be to add a clause such that we attempt to lookup a "gateway" as a validator, failing that as a gateway, and failing that return the accumulator and move on, but that seems more hacky and likely to leave a footgun waiting for us. it might look something like:

this is a terrible idea; please disregard