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
|
||||
ignore = untracked
|
||||
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"]
|
||||
path = vendor/nim-unicodedb
|
||||
url = https://github.com/nitely/nim-unicodedb.git
|
||||
|
|
|
@ -52,9 +52,6 @@ from
|
|||
import
|
||||
TopicParams, validateParameters, init
|
||||
|
||||
const
|
||||
hasPrompt = false and not defined(withoutPrompt) # disabled, doesn't work
|
||||
|
||||
type
|
||||
RpcServer* = RpcHttpServer
|
||||
|
||||
|
@ -1502,38 +1499,6 @@ proc initStatusBar(node: BeaconNode) {.raises: [Defect, ValueError].} =
|
|||
|
||||
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.} =
|
||||
let port = try:
|
||||
let value = parseInt(config.rpcUrlForExit.port)
|
||||
|
@ -1732,9 +1697,6 @@ proc doRunBeaconNode(config: var BeaconNodeConf, rng: ref BrHmacDrbgContext) {.r
|
|||
|
||||
initStatusBar(node)
|
||||
|
||||
when hasPrompt:
|
||||
initPrompt(node)
|
||||
|
||||
if node.nickname != "":
|
||||
dynamicLogScope(node = node.nickname): node.start()
|
||||
else:
|
||||
|
|
|
@ -7,5 +7,4 @@
|
|||
|
||||
@if testnet_servers_image:
|
||||
-d:"chronicles_sinks=json"
|
||||
-d:"withoutPrompt"
|
||||
@end
|
||||
|
|
|
@ -7,6 +7,5 @@
|
|||
|
||||
@if testnet_servers_image:
|
||||
-d:"chronicles_sinks=json"
|
||||
-d:"withoutPrompt"
|
||||
@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.
|
||||
-d:"libp2p_pki_schemes=secp256k1"
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Subproject commit b0ea27c34ca7aaee42333541f37b182fa239c844
|
Loading…
Reference in New Issue