Skip to content

Commit

Permalink
Merge PR: upload delta when fast sync (#2947)
Browse files Browse the repository at this point in the history
  • Loading branch information
chengzhinei authored Feb 13, 2023
1 parent 0a05d48 commit 9a1c01f
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions libs/tendermint/state/execution_dds.go
Original file line number Diff line number Diff line change
Expand Up @@ -193,13 +193,11 @@ func (dc *DeltaContext) postApplyBlock(height int64, deltaInfo *DeltaInfo,
// delta producer
if dc.uploadDelta {
trace.GetElapsedInfo().AddInfo(trace.Delta, fmt.Sprintf("ratio<%.2f>", dc.hitRatio()))
if !isFastSync {
wdFunc := evmWatchDataManager.CreateWatchDataGenerator()
wasmWdFunc := wasmWatchDataManager.CreateWatchDataGenerator()
go dc.uploadData(height, abciResponses, deltaMap, wdFunc, wasmWdFunc)
} else {
dc.logger.Info("Do not upload delta in case of fast sync:", "target-height", height)
}

wdFunc := evmWatchDataManager.CreateWatchDataGenerator()
wasmWdFunc := wasmWatchDataManager.CreateWatchDataGenerator()
go dc.uploadData(height, abciResponses, deltaMap, wdFunc, wasmWdFunc)

}
}

Expand Down

0 comments on commit 9a1c01f

Please sign in to comment.