Conversation
Fails when enabled.
| } | ||
| } | ||
| }) | ||
| .await?; |
There was a problem hiding this comment.
Hmm, I'm not quite sure I understand this.
Isn't ethereum.subscribe_block_headers(_).await? expected to ~never return unless an error occurs?
There was a problem hiding this comment.
Hmm, yes - which would mean the code after it is just dead...
|
Maybe we should wait for some input from @t00ts before going on with this one. As far as I understand the initial idea was something like this:
This is meant to ensure that we do have price data starting from a point in history. Removing fetching of historical prices changes this code significantly and I'm not absolutely convinced that we don't need that. |
Yes - upon reflection, if the retrieval of historical prices cannot be before the subscription, and it cannot be after it, it could still be inside... |
|
Superseded by #3197 . |
Fixes
sync_gas_pricesgetting stuck on historical data, ignoring subscribed updates.The
sync_gas_pricesfunction often failed to updateL1GasPriceProvider, becauseL1GasPriceProviderexpects its samples to be added in sequential block order, andsync_gas_pricestries twice, possibly with a gap in between.