AntelopeIO / spring

C++ implementation of the Antelope protocol with Savanna consensus
Other
10 stars 5 forks source link

[1.0.4 -> main] Advance fork db root when pending lib greater than head #1012

Closed heifner closed 3 weeks ago

heifner commented 3 weeks ago

When syncing under Savanna it is common for pending LIB to be greater than head. log_irreversible updates the block log and fork db root by the range of blocks from root->LIB when head is in root->LIB. Since LIB can be greater than head this would result in forkdb.fetch_branch returning an empty branch since searching back from head would not find the LIB causing large delays in the advancement of root.

Update log_irreversible to fetch branch from root->head when LIB is greater than head and head is in root->head.

Merges release/1.0 into main including #1009

Resolves #1003

ericpassmore commented 3 weeks ago

Note:start category: System Stability component: Internal summary: Performance Update, advance fork db root when pending lib greater than head. Note:end