From 4dab688b6f672096225adc45a9fb1d77d5c0c19e Mon Sep 17 00:00:00 2001 From: benbierens Date: Fri, 30 Jun 2023 09:54:13 +0200 Subject: [PATCH] Adds delay in deployer to ensure accounts are unlocked on time. --- CodexNetDeployer/Deployer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CodexNetDeployer/Deployer.cs b/CodexNetDeployer/Deployer.cs index b4efd3f6..65cbb069 100644 --- a/CodexNetDeployer/Deployer.cs +++ b/CodexNetDeployer/Deployer.cs @@ -35,6 +35,11 @@ namespace CodexNetDeployer Log("Geth started. Codex contracts deployed."); Log("Warning: It can take up to 45 minutes for the Geth node to finish unlocking all if its 1000 preconfigured accounts."); + // It takes a second for the geth node to unlock a single account. Let's assume 3. + // We can't start the codex nodes until their accounts are definitely unlocked. So + // We wait: + Thread.Sleep(TimeSpan.FromSeconds(3.0 * config.NumberOfCodexNodes!.Value)); + Log("Starting Codex nodes..."); // Each node must have its own IP, so it needs it own pod. Start them 1 at a time.