Implement fair channel allocation in ChanKeep

* Allocate channels to relays only if they have free space based on
their chanlimit value
* Minify channels by removing ones that are already covered before
passing them off to be joined
This commit is contained in:
2019-10-12 21:05:55 +01:00
parent 7a6e3338c0
commit 0321651c20
4 changed files with 103 additions and 31 deletions

View File

@@ -65,7 +65,6 @@ def provisionRelay(num, network):
def provisionMultipleRelays(net, relaysNeeded):
for i in range(relaysNeeded):
num, alias = main.network[net].add_relay()
print(relaysNeeded, "for", net, ":", num, alias)
provisionRelay(num, net)
main.saveConf("network")