From da805c022ebd4871db37a3885ffc13cb4dd7dfe1 Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Fri, 2 Oct 2020 15:09:52 -0700 Subject: [PATCH 1/2] Fix top_centrality in sample-lnd.conf Input: > autopilot.heuristic={topk_centrality:1} Result: > strconv.ParseFloat: parsing "1}": invalid syntax Input: > autopilot.heuristic=topk_centrality:1 Result: > heuristic topk_centrality not available. Available heuristics are: [ 'preferential' 'externalscore' 'top_centrality' ] --- sample-lnd.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sample-lnd.conf b/sample-lnd.conf index 3298e8533..e7b8e5f21 100644 --- a/sample-lnd.conf +++ b/sample-lnd.conf @@ -477,8 +477,8 @@ litecoin.node=ltcd ; autopilot.allocation=0.6 ; Heuristic to activate, and the weight to give it during scoring. (default: -; {preferential:1}) -; autopilot.heuristic={topk_centrality:1} +; preferential:1) +; autopilot.heuristic=top_centrality:1 ; The smallest channel that the autopilot agent should create (default: 20000) ; autopilot.minchansize=20000 From 465c2d17f436bb45773fe9853f79ba4f0ea89dc6 Mon Sep 17 00:00:00 2001 From: Ben Woosley Date: Fri, 2 Oct 2020 20:13:54 -0700 Subject: [PATCH 2/2] autopilot: Change default heuristic to top_centrality --- config.go | 2 +- sample-lnd.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.go b/config.go index e81071704..e576284af 100644 --- a/config.go +++ b/config.go @@ -395,7 +395,7 @@ func DefaultConfig() Config { MinConfs: 1, ConfTarget: autopilot.DefaultConfTarget, Heuristic: map[string]float64{ - "preferential": 1.0, + "top_centrality": 1.0, }, }, PaymentsExpirationGracePeriod: defaultPaymentsExpirationGracePeriod, diff --git a/sample-lnd.conf b/sample-lnd.conf index e7b8e5f21..dc4bac396 100644 --- a/sample-lnd.conf +++ b/sample-lnd.conf @@ -477,8 +477,8 @@ litecoin.node=ltcd ; autopilot.allocation=0.6 ; Heuristic to activate, and the weight to give it during scoring. (default: -; preferential:1) -; autopilot.heuristic=top_centrality:1 +; top_centrality:1) +; autopilot.heuristic=preferential:1 ; The smallest channel that the autopilot agent should create (default: 20000) ; autopilot.minchansize=20000