diff --git a/examples/v2/chat2.nim b/examples/v2/chat2.nim index 0478b22d5..fe0c4a69c 100644 --- a/examples/v2/chat2.nim +++ b/examples/v2/chat2.nim @@ -6,7 +6,7 @@ when not(compileOption("threads")): {.push raises: [Defect].} -import std/[tables, strformat, strutils, times, json, options] +import std/[tables, strformat, strutils, times, json, options, random] import confutils, chronicles, chronos, stew/shims/net as stewNet, eth/keys, bearssl, stew/[byteutils, endians2, results], nimcrypto/pbkdf2 @@ -456,7 +456,7 @@ proc processInput(rfd: AsyncFD, rng: ref BrHmacDrbgContext) {.async.} = storenode = some(parseRemotePeerInfo(conf.storenode)) elif discoveredNodes.len > 0: echo "Store enabled, but no store nodes configured. Choosing one at random from discovered peers" - storenode = some(discoveredNodes[0]) + storenode = some(discoveredNodes[rand(0..len(discoveredNodes) - 1)]) if storenode.isSome(): # We have a viable storenode. Let's query it for historical messages. diff --git a/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool b/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool index f25ad5214..637c33a7d 100755 --- a/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool +++ b/vendor/nim-libbacktrace/vendor/libbacktrace-upstream/libtool @@ -2,7 +2,7 @@ # libtool - Provide generalized library-building support services. # Generated automatically by config.status (libbacktrace) version-unused -# Libtool was configured on host fv-az245-630: +# Libtool was configured on host fv-az220-175: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,