Revise use of diode for communicating the target height
Closed this issue · 0 comments
zale144 commented
Currently, in the retriever, a diode targetSyncHeight
which has a buffer size of 1 is used for communicating what the is current highest block size on the DA.
Here we are adding TargetHeight
which we use to keep track of what the current highest block is found on both DA and P2P.
This could arguably be simplified, or possibly even merged into a single atomic.Uint64
field, and if needed, using sync.Cond
to communicate between goroutines whenever the value is updated.