mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-02 09:46:26 +00:00
This commit is contained in:
parent
e6b8bc6527
commit
ee1465e320
@ -134,6 +134,7 @@ type
|
|||||||
depositsChain: Eth1Chain
|
depositsChain: Eth1Chain
|
||||||
eth1Progress: AsyncEvent
|
eth1Progress: AsyncEvent
|
||||||
|
|
||||||
|
exchangedConfiguration*: bool
|
||||||
terminalBlockHash*: Option[BlockHash]
|
terminalBlockHash*: Option[BlockHash]
|
||||||
terminalBlockNumber*: Option[Quantity]
|
terminalBlockNumber*: Option[Quantity]
|
||||||
|
|
||||||
@ -588,8 +589,17 @@ proc exchangeTransitionConfiguration*(p: Eth1Monitor): Future[EtcStatus] {.async
|
|||||||
localValue = consensusCfg.terminalTotalDifficulty
|
localValue = consensusCfg.terminalTotalDifficulty
|
||||||
return EtcStatus.mismatch
|
return EtcStatus.mismatch
|
||||||
|
|
||||||
|
if not p.exchangedConfiguration:
|
||||||
|
# Log successful engine configuration exchange once at startup
|
||||||
|
p.exchangedConfiguration = true
|
||||||
|
info "Exchanged engine configuration",
|
||||||
|
ttd = executionCfg.terminalTotalDifficulty,
|
||||||
|
terminalBlockHash = executionCfg.terminalBlockHash,
|
||||||
|
terminalBlockNumber = executionCfg.terminalBlockNumber.uint64
|
||||||
|
|
||||||
if p.terminalBlockNumber.isSome and p.terminalBlockHash.isSome:
|
if p.terminalBlockNumber.isSome and p.terminalBlockHash.isSome:
|
||||||
var res = EtcStatus.match
|
var res = EtcStatus.match
|
||||||
|
|
||||||
if consensusCfg.terminalBlockNumber != executionCfg.terminalBlockNumber:
|
if consensusCfg.terminalBlockNumber != executionCfg.terminalBlockNumber:
|
||||||
warn "Engine API reporting different terminal block number",
|
warn "Engine API reporting different terminal block number",
|
||||||
engineAPI_value = executionCfg.terminalBlockNumber.uint64,
|
engineAPI_value = executionCfg.terminalBlockNumber.uint64,
|
||||||
@ -602,6 +612,13 @@ proc exchangeTransitionConfiguration*(p: Eth1Monitor): Future[EtcStatus] {.async
|
|||||||
res = EtcStatus.mismatch
|
res = EtcStatus.mismatch
|
||||||
return res
|
return res
|
||||||
else:
|
else:
|
||||||
|
if executionCfg.terminalBlockHash == default BlockHash:
|
||||||
|
# If TERMINAL_BLOCK_HASH is stubbed with
|
||||||
|
# 0x0000000000000000000000000000000000000000000000000000000000000000 then
|
||||||
|
# TERMINAL_BLOCK_HASH and TERMINAL_BLOCK_NUMBER parameters MUST NOT take
|
||||||
|
# an effect.
|
||||||
|
return EtcStatus.match
|
||||||
|
|
||||||
p.terminalBlockNumber = some executionCfg.terminalBlockNumber
|
p.terminalBlockNumber = some executionCfg.terminalBlockNumber
|
||||||
p.terminalBlockHash = some executionCfg.terminalBlockHash
|
p.terminalBlockHash = some executionCfg.terminalBlockHash
|
||||||
return EtcStatus.localConfigurationUpdated
|
return EtcStatus.localConfigurationUpdated
|
||||||
|
Loading…
x
Reference in New Issue
Block a user