newPayload `INVALIDATED` should be `unviableFork` (#4180)
This commit is contained in:
parent
9750cd3a38
commit
a0ead042ad
|
@ -300,7 +300,7 @@ template toGaugeValue(x: Quantity): int64 =
|
||||||
func compute_time_at_slot(genesis_time: uint64, slot: Slot): uint64 =
|
func compute_time_at_slot(genesis_time: uint64, slot: Slot): uint64 =
|
||||||
genesis_time + slot * SECONDS_PER_SLOT
|
genesis_time + slot * SECONDS_PER_SLOT
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.1/specs/phase0/validator.md#get_eth1_data
|
# https://github.com/ethereum/consensus-specs/blob/v1.2.0/specs/phase0/validator.md#get_eth1_data
|
||||||
func voting_period_start_time(state: ForkedHashedBeaconState): uint64 =
|
func voting_period_start_time(state: ForkedHashedBeaconState): uint64 =
|
||||||
let eth1_voting_period_start_slot =
|
let eth1_voting_period_start_slot =
|
||||||
getStateField(state, slot) - getStateField(state, slot) mod
|
getStateField(state, slot) - getStateField(state, slot) mod
|
||||||
|
|
|
@ -560,7 +560,8 @@ proc runQueueProcessingLoop*(self: ref BlockProcessor) {.async.} =
|
||||||
# Every loop iteration ends with some version of blck.resfut.complete(),
|
# Every loop iteration ends with some version of blck.resfut.complete(),
|
||||||
# including processBlock(), otherwise the sync manager stalls.
|
# including processBlock(), otherwise the sync manager stalls.
|
||||||
if not blck.resfut.isNil:
|
if not blck.resfut.isNil:
|
||||||
blck.resfut.complete(Result[void, BlockError].err(BlockError.Invalid))
|
blck.resfut.complete(
|
||||||
|
Result[void, BlockError].err(BlockError.UnviableFork))
|
||||||
else:
|
else:
|
||||||
self[].processBlock(
|
self[].processBlock(
|
||||||
blck,
|
blck,
|
||||||
|
|
|
@ -179,7 +179,7 @@ func apply_light_client_update(
|
||||||
didProgress = true
|
didProgress = true
|
||||||
didProgress
|
didProgress
|
||||||
|
|
||||||
# https://github.com/ethereum/consensus-specs/blob/v1.2.0-rc.3/specs/altair/light-client/sync-protocol.md#process_light_client_store_force_update
|
# https://github.com/ethereum/consensus-specs/blob/v1.2.0/specs/altair/light-client/sync-protocol.md#process_light_client_store_force_update
|
||||||
type
|
type
|
||||||
ForceUpdateResult* = enum
|
ForceUpdateResult* = enum
|
||||||
NoUpdate,
|
NoUpdate,
|
||||||
|
|
Loading…
Reference in New Issue