Make the default network for portalcli the history network (#1195)

This commit is contained in:
Kim De Mey 2022-08-23 16:28:10 +02:00 committed by GitHub
parent fe54f93ab6
commit 55dcbe9e58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 8 deletions

View File

@ -16,7 +16,7 @@ import
../common/common_utils,
../content_db,
../network/wire/[portal_protocol, portal_stream],
../network/state/[state_content, state_network]
../network/history/[history_content, history_network]
const
defaultListenAddress* = (static ValidIpAddress.init("0.0.0.0"))
@ -102,7 +102,7 @@ type
name: "metrics-port" .}: Port
protocolId* {.
defaultValue: stateProtocolId
defaultValue: historyProtocolId
desc: "Portal wire protocol id for the network to connect to"
name: "protocol-id" .}: PortalProtocolId
@ -200,11 +200,9 @@ proc testContentIdHandler(contentKey: ByteList): Option[ContentId] =
proc dbGetHandler(db: ContentDB, contentKey: ByteList):
(Option[ContentId], Option[seq[byte]]) =
let contentIdOpt = contentKey.toContentId()
if contentIdOpt.isSome():
(contentIdOpt, db.get(contentIdOpt.get()))
else:
(contentIdOpt, none(seq[byte]))
let contentId = contentKey.toContentId()
(some(contentId), db.get(contentId))
proc run(config: PortalCliConf) =
let

View File

@ -69,7 +69,7 @@ task fluffy, "Build fluffy":
buildBinary "fluffy", "fluffy/", "-d:chronicles_log_level=TRACE -d:chronosStrictException -d:PREFER_BLST_SHA256=false"
task fluffy_tools, "Build fluffy tools":
buildBinary "portalcli", "fluffy/tools/", "-d:chronicles_log_level=TRACE -d:chronosStrictException"
buildBinary "portalcli", "fluffy/tools/", "-d:chronicles_log_level=TRACE -d:chronosStrictException -d:PREFER_BLST_SHA256=false"
buildBinary "blockwalk", "fluffy/tools/", "-d:chronicles_log_level=TRACE -d:chronosStrictException"
buildBinary "eth_data_exporter", "fluffy/tools/", "-d:chronicles_log_level=TRACE -d:chronosStrictException -d:PREFER_BLST_SHA256=false"