From c64534095c4c2b1d4ed73b241addb74a3d5a61a3 Mon Sep 17 00:00:00 2001
From: Hugo Trentesaux <hugo@trentesaux.fr>
Date: Mon, 12 Feb 2024 12:25:22 +0100
Subject: [PATCH] fix distance oracle entrypoint

- reorder dependencies
- update entrypoint with correct arg
---
 distance-oracle/Cargo.toml        | 25 +++++++++++++++----------
 docker/docker-distance-entrypoint |  2 +-
 2 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/distance-oracle/Cargo.toml b/distance-oracle/Cargo.toml
index 3f7614e3e..402ce71ad 100644
--- a/distance-oracle/Cargo.toml
+++ b/distance-oracle/Cargo.toml
@@ -27,26 +27,31 @@ try-runtime = ["sp-distance/try-runtime", "sp-runtime/try-runtime"]
 runtime-benchmarks = []
 
 [dependencies]
+# crates.io dependencies
+log = { workspace = true }
+simple_logger = { workspace = true }
 clap = { workspace = true, features = ["derive"], optional = true }
-codec = { workspace = true }
 fnv = { workspace = true }
 hex = { workspace = true }
-log = { workspace = true }
 num-traits = { workspace = true }
 rayon = { workspace = true }
-simple_logger = { workspace = true }
-sp-core = { workspace = true }
-sp-distance = { workspace = true }
-sp-runtime = { workspace = true }
+tokio = { workspace = true, features = [
+	"rt-multi-thread",
+	"macros",
+], optional = true }
+
+# subxt
 subxt = { workspace = true, features = [
 	"substrate-compat",
 	"native",
 	"jsonrpsee",
 ] }
-tokio = { workspace = true, features = [
-	"rt-multi-thread",
-	"macros",
-], optional = true }
+
+# substrate dependencies
+codec = { workspace = true }
+sp-core = { workspace = true }
+sp-distance = { workspace = true }
+sp-runtime = { workspace = true }
 
 [dev-dependencies]
 bincode = { workspace = true }
diff --git a/docker/docker-distance-entrypoint b/docker/docker-distance-entrypoint
index 3298bcdab..9e184f48d 100755
--- a/docker/docker-distance-entrypoint
+++ b/docker/docker-distance-entrypoint
@@ -14,7 +14,7 @@ else
   ORACLE_LOG_LEVEL="${ORACLE_LOG_LEVEL:-info}"
 
   while [ true ]; do
-    distance-oracle -d "$ORACLE_RESULT_DIR" -D "$ORACLE_MAX_DEPTH" -u "$ORACLE_RPC_URL" -l "$ORACLE_LOG_LEVEL"
+    distance-oracle --evaluation-result-dir "$ORACLE_RESULT_DIR" --rpc-url "$ORACLE_RPC_URL" --log "$ORACLE_LOG_LEVEL"
     echo "Waiting $ORACLE_EXECUTION_INTERVAL seconds before next execution..."
     sleep $ORACLE_EXECUTION_INTERVAL
   done
-- 
GitLab