keep proposal state around in clearance to reapply block lagfree

This commit is contained in:
Etan Kissling 2024-03-26 05:13:35 +01:00
parent 97ec45e939
commit 2b169efa23
No known key found for this signature in database
GPG Key ID: B21DA824C5A3D03D
1 changed files with 3 additions and 2 deletions

View File

@ -2657,9 +2657,12 @@ proc getProposalState*(
# and thus has a hot hash tree cache
let state =
if dag.incrementalState != nil:
# The block's pre-state will be needed soon to validate our own block
dag.clearanceState.assign(dag.incrementalState[])
dag.incrementalState
else:
assignClone(dag.clearanceState)
dag.resetChainProgressWatchdog()
var
info = ForkedEpochInfo()
@ -2681,8 +2684,6 @@ proc getProposalState*(
dag.cfg, state[], slot, cache, info,
{skipLastStateRootCalculation}).expect("advancing 1 slot should not fail")
# Ensure async operations don't interfere with `incrementalState`
dag.resetChainProgressWatchdog()
ok state
func aggregateAll*(