remove remaining traces of nim-prompt
upstream dead, as is feature in eth2
This commit is contained in:
parent
c3a0e4ec16
commit
63717531dc
|
@ -108,11 +108,6 @@
|
||||||
url = https://github.com/status-im/news.git
|
url = https://github.com/status-im/news.git
|
||||||
ignore = untracked
|
ignore = untracked
|
||||||
branch = status
|
branch = status
|
||||||
[submodule "vendor/nim-prompt"]
|
|
||||||
path = vendor/nim-prompt
|
|
||||||
url = https://github.com/status-im/nim-prompt.git
|
|
||||||
ignore = untracked
|
|
||||||
branch = master
|
|
||||||
[submodule "vendor/nim-unicodedb"]
|
[submodule "vendor/nim-unicodedb"]
|
||||||
path = vendor/nim-unicodedb
|
path = vendor/nim-unicodedb
|
||||||
url = https://github.com/nitely/nim-unicodedb.git
|
url = https://github.com/nitely/nim-unicodedb.git
|
||||||
|
|
|
@ -52,9 +52,6 @@ from
|
||||||
import
|
import
|
||||||
TopicParams, validateParameters, init
|
TopicParams, validateParameters, init
|
||||||
|
|
||||||
const
|
|
||||||
hasPrompt = false and not defined(withoutPrompt) # disabled, doesn't work
|
|
||||||
|
|
||||||
type
|
type
|
||||||
RpcServer* = RpcHttpServer
|
RpcServer* = RpcHttpServer
|
||||||
|
|
||||||
|
@ -1502,38 +1499,6 @@ proc initStatusBar(node: BeaconNode) {.raises: [Defect, ValueError].} =
|
||||||
|
|
||||||
asyncSpawn statusBarUpdatesPollingLoop()
|
asyncSpawn statusBarUpdatesPollingLoop()
|
||||||
|
|
||||||
when hasPrompt:
|
|
||||||
# TODO: nim-prompt seems to have threading issues at the moment
|
|
||||||
# which result in sporadic crashes. We should introduce a
|
|
||||||
# lock that guards the access to the internal prompt line
|
|
||||||
# variable.
|
|
||||||
#
|
|
||||||
# var p = Prompt.init("nimbus > ", providePromptCompletions)
|
|
||||||
# p.useHistoryFile()
|
|
||||||
|
|
||||||
from unicode import Rune
|
|
||||||
import prompt
|
|
||||||
|
|
||||||
func providePromptCompletions*(line: seq[Rune], cursorPos: int): seq[string] =
|
|
||||||
# TODO
|
|
||||||
# The completions should be generated with the general-purpose command-line
|
|
||||||
# parsing API of Confutils
|
|
||||||
result = @[]
|
|
||||||
|
|
||||||
proc processPromptCommands(p: ptr Prompt) {.thread.} =
|
|
||||||
while true:
|
|
||||||
var cmd = p[].readLine()
|
|
||||||
case cmd
|
|
||||||
of "quit":
|
|
||||||
quit 0
|
|
||||||
else:
|
|
||||||
p[].writeLine("Unknown command: " & cmd)
|
|
||||||
|
|
||||||
proc initPrompt(node: BeaconNode) =
|
|
||||||
# var t: Thread[ptr Prompt]
|
|
||||||
# createThread(t, processPromptCommands, addr p)
|
|
||||||
discard
|
|
||||||
|
|
||||||
proc handleValidatorExitCommand(config: BeaconNodeConf) {.async.} =
|
proc handleValidatorExitCommand(config: BeaconNodeConf) {.async.} =
|
||||||
let port = try:
|
let port = try:
|
||||||
let value = parseInt(config.rpcUrlForExit.port)
|
let value = parseInt(config.rpcUrlForExit.port)
|
||||||
|
@ -1732,9 +1697,6 @@ proc doRunBeaconNode(config: var BeaconNodeConf, rng: ref BrHmacDrbgContext) {.r
|
||||||
|
|
||||||
initStatusBar(node)
|
initStatusBar(node)
|
||||||
|
|
||||||
when hasPrompt:
|
|
||||||
initPrompt(node)
|
|
||||||
|
|
||||||
if node.nickname != "":
|
if node.nickname != "":
|
||||||
dynamicLogScope(node = node.nickname): node.start()
|
dynamicLogScope(node = node.nickname): node.start()
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -7,5 +7,4 @@
|
||||||
|
|
||||||
@if testnet_servers_image:
|
@if testnet_servers_image:
|
||||||
-d:"chronicles_sinks=json"
|
-d:"chronicles_sinks=json"
|
||||||
-d:"withoutPrompt"
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -7,6 +7,5 @@
|
||||||
|
|
||||||
@if testnet_servers_image:
|
@if testnet_servers_image:
|
||||||
-d:"chronicles_sinks=json"
|
-d:"chronicles_sinks=json"
|
||||||
-d:"withoutPrompt"
|
|
||||||
@end
|
@end
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,2 @@
|
||||||
# TODO:
|
|
||||||
# This prevents a strange build failure in nimbus_beacon_node.nim.
|
|
||||||
# Investigate why it's needed.
|
|
||||||
-d:withoutPrompt
|
|
||||||
|
|
||||||
# Use only `secp256k1` public key cryptography as an identity in LibP2P.
|
# Use only `secp256k1` public key cryptography as an identity in LibP2P.
|
||||||
-d:"libp2p_pki_schemes=secp256k1"
|
-d:"libp2p_pki_schemes=secp256k1"
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
Subproject commit b0ea27c34ca7aaee42333541f37b182fa239c844
|
|
Loading…
Reference in New Issue