ledger: revert completely clearing missing parents buffer upon finality of consensus round
@@ -1347,9 +1347,17 @@ func query(l *Ledger, state *stateQuerying) func(stop <-chan struct{}) error {
}
l.muMissing.Lock()
- for id := range l.missing {
+ for id, buffered := range l.missing {
+ for _, tx := range buffered {
+ if tx.ViewID < l.v.loadViewID(newRoot) {
+ delete(buffered, tx.ID)
+ }
+ }
+
+ if len(buffered) == 0 {
delete(l.missing, id)
}
+ }
l.muMissing.Unlock()
logger := log.Consensus("round_end")
