mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-02 01:36:06 +00:00
parent
66a5e88203
commit
91a1b4e0c5
@ -95,7 +95,9 @@ proc doTrustedNodeSync*(
|
||||
# When we don't have a head, we'll use the given checkpoint as head
|
||||
FAR_FUTURE_SLOT
|
||||
|
||||
var client = RestClientRef.new(restUrl).get()
|
||||
var client = RestClientRef.new(restUrl).valueOr:
|
||||
error "Cannot connect to server", url = restUrl, error = error
|
||||
quit 1
|
||||
|
||||
proc downloadBlock(slot: Slot):
|
||||
Future[Option[ref ForkedSignedBeaconBlock]] {.async.} =
|
||||
@ -107,7 +109,9 @@ proc doTrustedNodeSync*(
|
||||
except CatchableError as exc:
|
||||
lastError = exc
|
||||
warn "Retrying download of block", slot, err = exc.msg
|
||||
client = RestClientRef.new(restUrl).get()
|
||||
client = RestClientRef.new(restUrl).valueOr:
|
||||
error "Cannot connect to server", url = restUrl, error = error
|
||||
quit 1
|
||||
|
||||
error "Unable to download block - backfill incomplete, but will resume when you start the beacon node",
|
||||
slot, error = lastError.msg, url = client.address
|
||||
@ -115,11 +119,9 @@ proc doTrustedNodeSync*(
|
||||
quit 1
|
||||
|
||||
let
|
||||
dbGenesis = db.getGenesisBlock()
|
||||
localGenesisRoot = if dbGenesis.isSome():
|
||||
dbGenesis.get()
|
||||
else:
|
||||
let genesisState = if genesisState != nil:
|
||||
localGenesisRoot = db.getGenesisBlock().valueOr:
|
||||
let genesisState =
|
||||
if genesisState != nil:
|
||||
genesisState
|
||||
else:
|
||||
notice "Downloading genesis state", restUrl
|
||||
|
Loading…
x
Reference in New Issue
Block a user