client/authority-discovery: Limit the amount of sentries per authority (#4302)

When receiving more addresses for a given authority than a defined
threshold (5), the authority discovery drops the remaining in order to
prevent a single authority to fill all priority group slots.
This commit is contained in:
Max Inden
2019-12-05 16:05:42 +01:00
committed by Gavin Wood
parent 2231c06294
commit af3fc1d95a
3 changed files with 22 additions and 1 deletions
@@ -27,6 +27,7 @@ serde_json = "1.0.41"
sp-runtime = { path = "../../primitives/sr-primitives" }
[dev-dependencies]
env_logger = "0.7.0"
parking_lot = "0.9.0"
peerset = { package = "sc-peerset", path = "../peerset" }
test-client = { package = "substrate-test-runtime-client", path = "../../test/utils/runtime/client" }